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
The ES module build output of shop-app.js and shop-checkout.js in the shop#lit-element branch have exports, and this causes warnings that prevent the ES module output from being minified.
➜ shop-3 git:(lit-element) ✗ polymer build
info: Clearing build/ directory...
info: (esm-bundled) Building...
info: (es6-bundled) Building...
warn: [cli.build.optimize-streams] js-transform: Unable to optimize /Users/keanulee/Code/Polymer/shop-3/src/components/shop-checkout.js
{ err: 'Property local of ExportSpecifier expected node to be of a type ["Identifier"] but instead got "StringLiteral"' }
warn: [cli.build.optimize-streams] js-transform: Unable to optimize /Users/keanulee/Code/Polymer/shop-3/src/components/shop-app.js
{ err: 'Property local of ExportSpecifier expected node to be of a type ["Identifier"] but instead got "StringLiteral"' }
Could not resolve module specifier "require" in file "/Users/keanulee/Code/Polymer/shop-3/src/components/shop-app.js".
info: (es5-bundled) Building...
Could not resolve module specifier "require" in file "/Users/keanulee/Code/Polymer/shop-3/src/components/shop-app.js".
info: (esm-bundled) Build complete!
info: (es5-bundled) Build complete!
info: (es6-bundled) Build complete!
Expected Results
shop-app.js and shop-checkout.js bundles in build/esm-bundled/src/components/ are minified.
Actual Results
shop-app.js and shop-checkout.js bundles in build/esm-bundled/src/components/ are not minified.
The text was updated successfully, but these errors were encountered:
I tracked this down to a bug in Babel's minify-constant-folding plugin. I believe it is substituting value expressions directly into ExportSpecifiers (e.g. const foo = "foo"; export { foo }; becomes export { "foo" }; which is invalid.
babel/minify#820 was already filed, so I updated it with the additional information I found.
For our purposes, I think I'm just going to disable the minify-constant-folding plugin until this bug is fixed.
Versions & Environment
Steps to Reproduce
The ES module build output of shop-app.js and shop-checkout.js in the shop#lit-element branch have exports, and this causes warnings that prevent the ES module output from being minified.
Expected Results
shop-app.js and shop-checkout.js bundles in build/esm-bundled/src/components/ are minified.
Actual Results
shop-app.js and shop-checkout.js bundles in build/esm-bundled/src/components/ are not minified.
The text was updated successfully, but these errors were encountered: