Unexpected token: name (MDCRipple) from UglifyJS
See original GitHub issueI am using Laravel Mix to compile my assets. Laravel Mix has a script to compile minified assets.
npm run production
This, in turn, invokes UglifyJS to minify assets. During this step it throws an error.
Unexpected token: name (MDCRipple) [./~/@material/ripple/index.js:25,0]
I am using material-components-web version 0.8.0.
Issue Analytics
- State:
- Created 6 years ago
- Comments:17 (6 by maintainers)
Top Results From Across the Web
UglifyJS webpack plugin throws: Unexpected token: name ...
My recommendation is Babelify to which I switched after having constant errors with Uglify. Edit: The problem might be in your new webpack....
Read more >How I Fixed: UglifyJs Unexpected token: name (DropIn)
I've been trying – in vain – to build the front end for CodeReviewVideos. The issue I have been hitting upon is as...
Read more >SyntaxError: Unexpected token: name (xxxxxx) from Uglify ...
Using webpack.optimize.UglifyJsPlugin() in webpack.config throws SyntaxError: Unexpected token: name (xxxxxx) . The code there is unreachable.
Read more >ERROR in file.js from UglifyJs SyntaxError: Unexpected token
Recently whilst upgrading from Webpack to Webpack2, I ran into this error which took a while to debug. I was seeing the following...
Read more >MatBlazor/community - Gitter
Hi folks, I am new to Blazor and MatBlazor! I am having issues with closing a MatDialog component from a child component. Is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@amrittb Your problem is you aren’t running js files through the babel-loader. There is no rule set for js files. Once you run the JS files through babel things compile properly.
I suspect what is going on for you @lpirola is around the same lines. You need to make sure the material component JS files get ran through babel. This means allowing
node_module
stuff to be compiled through babel.I have created a Demo Repository. Here - Test Repository