rollup / rollup

Next-generation ES module bundler
https://rollupjs.org
Other
25.38k stars 1.53k forks source link

Discussion: fetchModule + generateChunks Hook #3695

Open frank-dspeed opened 4 years ago

frank-dspeed commented 4 years ago

Feature Use Case

this.graph.moduleLoader.fetchModule will get exposed via plugin context and will allow directly methods from ModuleLoader on graph.moduleLoader

this.fetchModule(   
                id: string,
        importer: string | undefined,
        moduleSideEffects: boolean | 'no-treeshake',
        syntheticNamedExports: boolean | string,
        isEntry: boolean
).then(module=>{/* */})

this.addAdditionalModules(unresolvedModules: string[]).then(modules=>)

Feature Proposal

I will prepare and explore that via a Pullrequest that i start now this weekend as i have personal interrest into that feature it will deprecate my rollup fork that is then maybe not needed anymore :)

lukastaegert commented 4 years ago

emitModule is not a good name if nothing is emitted...