-
Notifications
You must be signed in to change notification settings - Fork 700
Open
Description
What problem does this feature solve?
In our Rollup build, we use the renderDynamicImport hook to identify a specific dynamic import, to manipulate this for a later stage of the build. The manipulation itself can be done using the transform hook. However, correctly identifying this import requires the options.targetModuleId and options.moduleId properties passed to renderDynamicImport.
Example:
renderDynamicImport(options) {
if (
!options.targetModuleId &&
options.moduleId.includes('/some/dynamic/import')
) {
return { left: 'import(/* webpackIgnore: true */', right: ')' };
}
return undefined;
},What does the proposed API look like?
Implement renderDynamicImport with the same API as Rollup: https://rollupjs.org/plugin-development/#renderdynamicimport
Reactions are currently unavailable