jsesc breaks uglifyjs?
See original GitHub issueIs this a bug report?
No.
Summary
I am experimenting with jsesc
and I noticed that when used inside of react-create-app the yarn build
command will fail saying there is an invalid assignment
. You can see this behaviour in this demo repo:
https://github.com/tkjone/jsesc-test
You can see where I am using it in this file:
https://github.com/tkjone/jsesc-test/blob/master/src/App.js
To Reproduce
Move into the react-create-app
demo provided above and run yarn build
.
Output
➜ yarn build
yarn build v0.27.5
$ react-scripts build
Creating an optimized production build...
Failed to compile.
static/js/main.f43f915d.js from UglifyJs
Invalid assignment [./~/jsesc/jsesc.js:5,0][static/js/main.f43f915d.js:13460,32]
error Command failed with exit code 1.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to preserve line breaks in UglifyJS? - Stack Overflow
Well, you can always pass the -b option to UglifyJS (read here). This preserves the line breaks and indentation of the file.
Read more >Diff - platform/external/chromium-trace - Google Git
... + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", ... wasSuccessful(): - ok = False - if options.stop_on_error: - break - if ok ...
Read more >Help-widget NPM | npm.io
This is a template for adding a generic intercom-like help widget to your site. Check out the demo. Develop. yarn; yarn start. Use....
Read more >Dependencies | @backstage/cli | npm - Open Source Insights
arrow_right @babel/core. 7.20.5 Notes
Version 7.20.5 Published November 28...
arrow_right @babel/plugin‑transform‑modules‑commonjs. 7.19.6 Notes
Version 7.19.6 Published October 20, 20...
Read more >Build a Pluggable Web Widget: Getting Error - Mendix Forum
... 574 silly pacote range manifest for jsesc@^1.3.0 fetched in 359ms ... https://registry.npmjs.org/uglify-js 179ms (from cache) 586 silly ...
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
Please see
npm run build
fails to minify in our Troubleshooting seciton. 😄Unfortunately,
jsesc
does not ship a browser-compatible version.@tkjone looks like you need to downgrade to version 1.x for browser support, per @mathiasbynens’s comment.