Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support non entry chunks #13

Draft
wants to merge 10 commits into
base: test-mpa
Choose a base branch
from
Draft
Next Next commit
wip: support dynamic import chunk
hi-ogawa committed Dec 9, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit d5b095dd7bd4b50966f1fa33c8c68f07f4f413ee
9 changes: 9 additions & 0 deletions packages/vite/misc/rolldown-runtime.js
Original file line number Diff line number Diff line change
@@ -228,4 +228,13 @@ self.__rolldown_runtime = {
}
}
},
/**
* @param {string} chunkName
*/
async ensureChunk(chunkName) {
// TODO: chunk manifest? (need to inject from generateBundle?)
const chunkPath = chunkName
const data = await import(chunkPath)
Object.assign(this.moduleFactoryMap, data.default)
},
}