Skip to content

Commit

Permalink
chore: fix babel build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
josdejong committed Jul 15, 2024
1 parent 483a9c3 commit b1fd963
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion rollup.config.vanilla-library.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,15 @@ export default {

typescript({ sourceMap: true, inlineSources: true }),
getBabelOutputPlugin({
presets: ['@babel/preset-env']
// { modules: false } is to resolve the following console warning:
// Dynamic import can only be transformed when transforming ES modules to AMD, CommonJS or SystemJS.
// See: https://stackoverflow.com/questions/63563485/how-can-i-preserve-dynamic-import-statements-with-babel-preset-env
presets: [['@babel/preset-env', { modules: false }]],

// { compact: true } is to resolve the following console warning:
// [BABEL] Note: The code generator has deoptimised the styling of undefined as it exceeds the max of 500KB.
// See: https://github.com/babel/babel/discussions/13676
compact: true
}),

// minify
Expand Down

0 comments on commit b1fd963

Please sign in to comment.