Comments (17)
@dlo83 sounds like a breaking change on there side, we may want to lock our version down ...
My guess is this tripped up during uglification of a somewhat large file?
from broccoli-terser-sourcemap.
Correctamundo.
from broccoli-terser-sourcemap.
@dlo83 can you share the size, im curious if there is a specific cliff. Although i suspect it is depth complexity not overall size.
from broccoli-terser-sourcemap.
@stefanpenner I already downgraded to 2.5, so give me a few to try and recreate again and give you more specifics. In the meantime, could I tag you in to the discussion at mishoo/UglifyJS#863 ? The uglifyJS dev wants more information as to how this plugin calls uglify, and being fairly new to Ember, I'm not sure I'm the best resource on the subject.
from broccoli-terser-sourcemap.
@stefanpenner, I'm not sure how to get more verbose metrics/logs around the error; I pasted it directly from the terminal into the GitHub ticket. If you could shed some more light on how I can grab more in-depth information for you, I'd be happy to help.
from broccoli-terser-sourcemap.
@stefanpenner, does this plugin allow for compress options to be configured? I can avoid the uglify errors if I set "sequences" to false.
from broccoli-terser-sourcemap.
yes options are passed straight through:
- https://github.com/ef4/broccoli-uglify-sourcemap/blob/master/index.js#L22-L26
- https://github.com/ef4/broccoli-uglify-sourcemap/blob/master/index.js#L118
If you have an idea how to make this obvious in the readme a PR would be lovely.
from broccoli-terser-sourcemap.
Sure, I'll try it out for myself to verify and then create a PR.
from broccoli-terser-sourcemap.
@stefanpenner, sorry if this is a noob question, but I'm trying to figure out where I would override these options within the context of our Brocfile. (We're using an older version of Ember, so no .ember-cli)
Where in the following snippet would I pass through those compressor options ultimately consumed by uglify-js?
var app = new EmberApp(defaults, {
sourcemaps: {
enabled: true,
extensions: ['js']
},
minifyCSS: { enabled: true },
minifyJS: { enabled: true },
There is currently no configuration in our Brocfile for ember-cli-uglify, which I believe leverages this plugin, so I'm at a loss for how to pass this configuration down the stack.
from broccoli-terser-sourcemap.
I'm suddenly experiencing this same problem. Trying to investigate, but it seems like we might want to peg the version and do a release in the meantime so people aren't stuck.
from broccoli-terser-sourcemap.
but it seems like we might want to peg the version and do a release in the meantime so people aren't stuck.
yes, i am tempted. Would except a PR doing this as an interim step.
from broccoli-terser-sourcemap.
Confirming that locking to ~2.5.0
works on my project, then a PR is on the way.
from broccoli-terser-sourcemap.
Confirm that the PR (#18) resolves the issue on my project.
from broccoli-terser-sourcemap.
This isn't a long-term solution, but I determined that this issue occurred only when I was building for my staging environment, not my production environment.
In looking at the produced code, I realized that all of my tests were being included in the app.js file that was being passed to uglifyjs for my staging environment. By telling ember-cli to not include tests in my staging build, I have this working against 1.0.1.
I turned off tests by including this statement in my Brocfile.js (or ember-cli-build.js).
var isProductionLikeBuild = ['production', 'staging'].indexOf(env) > -1;
var app = new EmberApp({
tests: !isProductionLikeBuild,
...
});
Not a great long-term solution, but this might help those in a pinch.
from broccoli-terser-sourcemap.
Cli has no concept of staging. Production plus env vars to configure the build is prescribed. Otherwise the user must reimplement the rest of the concepts. Unsure how other plugins and addons could work this way.
from broccoli-terser-sourcemap.
Yep, I have to re-implement some behavior in my build file for the staging environment. I turn back on minification of JS and CSS, embed certain inline content (e.g. external scripts), etc.
However, I didn't think/realize my tests were being included and that turned out to be the addition that was pushing uglify js over the edge for me. I could see others with similar apps to mine (with lots of tests) potentially running into this issue in their staging environments (as they're pretty darn common) before the new release is out #20 . Additionally, people might have to nombom
unless a new version of ember-cli-uglify is released with a dependency bump for this project.
from broccoli-terser-sourcemap.
tmp fix, hopefully uglify fixes 4reals soon.
➜ broccoli-uglify-sourcemap git:(master) npm publish
+ [email protected]
from broccoli-terser-sourcemap.
Related Issues (20)
- Support publicPath and hidden-source-map HOT 4
- sources:["0"] in `no-upstream` and `with-broken` sourcemap
- Update to terser v4 HOT 2
- should this be called broccoli-terser-sourcemap? HOT 1
- WARNING: Option "nodeWorker" is deprecated since [email protected]. Please use "workerType" instead. HOT 1
- `EISDIR: illegal operation on a directory, read` error after library upgrade HOT 6
- Update to terser v5 HOT 3
- Circle CI Workers are terminated during build
- Console spam when parsing inline sourcemaps HOT 1
- "<URL> referenced in <RELATIVE_PATH> could not be found error" upgrading to v4 HOT 1
- prepend portion of asset-urls not accounted for
- Wrong path in sourcemap sources entry for chunks in assets dir
- parallelize processFile HOT 1
- Broken with Unicode Regex HOT 4
- production builds failing in ember 3.0.0.beta.2: broccoliBuilderErrorStack: TypeError: name.definition is not a function #35 HOT 2
- CHANGELOG outdated
- Document the options HOT 4
- Switch from uglify-es to terser HOT 1
- New dependency name: uglify-es => terser #1 HOT 13
- Move to terser breaks the order of yield in generators HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from broccoli-terser-sourcemap.