Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic configuration to minify and mangle produces completely broken JS #993

Open
doug-ross opened this issue Aug 30, 2020 · 2 comments
Open

Comments

@doug-ross
Copy link

Bug Report

The following command...

node_modules.bin\babel _display.js _plan_ab.js _plan_en.js _p_cover.js _reco_sl.js _tdata.js _tid_dec.js _v_mm.js _v_name.js --no-comments >..\lib\nlpbndl3.js

...using a config as follows (babel.config.json)

		{
		  "presets": [["minify", {
			"mangle": {
			  "exclude": ["MyCustomError"]
			},
			"keepFnName": false
		  }]]
		}	

Produces a single JS file that appears "right".

However, Chrome can't load the JS file and just hangs.

I know this bug report is incomplete (as I can't upload all of my code), but wondering if anyone else has experienced this issue.

@babel-bot
Copy link

Hey @doug-ross! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite."

@hzoo
Copy link
Member

hzoo commented Aug 30, 2020

Thanks for the issue! Yeah I think we wouldn't really be able to help here since there's no error message. (minify bugs are certainly difficult to debug in general though so it's understandable). I would note that we don't really consider using babel as a bundler (concating files), would recommend you use something like webpack/parcel/rollup/etc to that task. This repo is for Babel itself, not the minify preset, so moving the issue https://github.com/babel/minify

@hzoo hzoo transferred this issue from babel/babel Aug 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants