npm-package-template
npm-package-template copied to clipboard
Warning on build Dynamic import can only be transformed when transforming ES modules to AMD, CommonJS or SystemJS.
Describe the bug
When building we get the message Dynamic import can only be transformed when transforming ES modules to AMD, CommonJS or SystemJS.
To Reproduce
- install
- run build script
Expected behavior Build should be either configured to fully support dynamic imports or build targets that don't support dynamic imports should appropriately configured so no warning is raised.
Related: https://github.com/babel/babel/issues/14227
using this remove the warning
{ file: 'dist/index.es5.js', format: 'es', plugins: [getBabelOutputPlugin({ presets: [['@babel/preset-env', { modules: false }]] })], sourcemap: true },
I'm strictly not using import() syntax, only import {}
And I'm not a JS guy so not sure this is the correct solution
Thank you @balosh-daniel I will try it out.