You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
What problem does this feature solve?
In our Rollup build, we use the
renderDynamicImporthook to identify a specific dynamic import, to manipulate this for a later stage of the build. The manipulation itself can be done using thetransformhook. However, correctly identifying this import requires theoptions.targetModuleIdandoptions.moduleIdproperties passed torenderDynamicImport.Example:
What does the proposed API look like?
Implement
renderDynamicImportwith the same API as Rollup: https://rollupjs.org/plugin-development/#renderdynamicimport