-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Ember is minified even in development #20794
Comments
I checked this with a new app generated with 6.0 and one with 5.12 and |
You’re right, yes, it’s not minified but the whitespace removal is very inconvenient. Try debugging in Chrome - one cannot put breakpoints and can’t step-into stuff. Pretty-printing doesn’t help.
|
I had to test to be sure, but I have no problem putting breakpoints nor stepping through even with pretty print. |
@boris-petrov which browser are you using in development? Potentially a difference in handling debugging post pretty-printing? |
I'm not sure -- in my case I can set breakpoints in the - lines and they stay there (on Chrome devtools). |
The culprit seems to be one of these plugins that are added by default. I didn't narrow it down to a specific one. // plugins added by ember-cli-babel
[
['@babel/plugin-transform-class-static-block', { legacy: true }],
['@babel/plugin-proposal-decorators', { legacy: true }],
['@babel/plugin-proposal-private-property-in-object', { loose: false }],
['@babel/plugin-proposal-private-methods', { loose: false }],
['@babel/plugin-proposal-class-properties', { loose: false }],
] The whitespace issue is fixed if I add Lines 156 to 160 in be20bd3
The flag disables all of those babel plugins when building |
@NullVoxPopuli any thoughts here? |
is it still an issue in 6.4.0-alpha.3? |
Yes |
so, I think the path forward here is probably to progress towards vite |
Ok, so the problem is babel's compact option which, by default, strips whitespace from large files. It works to set |
🐞 Describe the Bug
For a few releases now, running
ember serve
leads to a minified build even though it's in development. I'm talking about Ember itself.🔬 Minimal Reproduction
ember new --pnpm ember-development-minified cd ember-development-minified pnpm start
Open http://localhost:4200/, open the devtools and check the
assets/vendor/ember/ember.js
file. It's minified.😕 Actual Behavior
Minified Ember which is difficult to use and debug.
🤔 Expected Behavior
Not minified Ember.
🌍 Environment
➕ Additional Context
Possibly due to this PR.
The text was updated successfully, but these errors were encountered: