babel-preset-modernize
babel-preset-modernize copied to clipboard
Hey 👋 I wanted to try out your optimize-plugin and ran into the following crash in transform-destructuring ``` errored out during transformation TypeError: .../dashboard.495836a2.js: Property argument of RestElement expected node...
``` (node:77743) UnhandledPromiseRejectionWarning: TypeError: .../.....2d2e7a10.js: Cannot read property 'constant' of undefined at PluginPass.FunctionExpression|FunctionDeclaration (.../node_modules/babel-preset-modernize/dist/plugins/transform-iife-arrows/index.js:1:424) at newFn (.../node_modules/@babel/traverse/lib/visitors.js:175:21) at NodePath._call (.../node_modules/@babel/traverse/lib/path/context.js:55:20) at NodePath.call (.../node_modules/@babel/traverse/lib/path/context.js:42:17) at NodePath.visit (.../node_modules/@babel/traverse/lib/path/context.js:92:31) at TraversalContext.visitQueue (.../node_modules/@babel/traverse/lib/context.js:115:16) at...
Trying to apply this preset in different forms and it throws different errors. The configuration which works: ``` const modernize = [ path.resolve(preset, './plugins/transform-umd-to-cjs'), // Currently disabled, causes problems with...