-
Notifications
You must be signed in to change notification settings - Fork 84
Closed
Description
Steps to reproduce:
- Create a new app using
preact-cli - Run
npm i -D preact-material-components - Add
import Button from 'preact-material-components/Button';insrc/app.js - Run
npm run build
Result:
bundle.js from UglifyJs
Unexpected token: name (Button) [bundle.js:553,6]
This issue (or similar ones) can also be reproduced in both preact-boilerplate and PreactSimpleStarter. These are easier to play around with since they expose their Webpack configs.
It appears to be due to UglifyJS's lack of support for ES6. However, adding /node_modules/preact-material-components to babel-loader in Webpack config just results in different unexpected token errors.
#77 seems to imply that there is a UMD version for those of us targeting ES5. How do I make sure my build process picks that up?
Metadata
Metadata
Assignees
Labels
No labels