-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Sourcemaps + fingerprinting regression with ember-cli-terser 4.0.2? #275
Comments
I also have an issue with sourcemap fingerprinting in 4.0.2. The behavior change is demonstrated below. 4.0.2 is giving sourcemaps a unique fingerprint in assetMap.json, but the actual sourcemap file outputted shares its fingerprint with the js file. 4.0.1 does not do this. Using 4.0.2 // assetMap.json
"assets/test-support.js": "assets/test-support-dbb5b19fdf03c2859ae16e7a1dc9f707.js",
"assets/test-support.map": "assets/test-support-a232a08ab47844d681757e283aac30fb.map",
"assets/vendor.js": "assets/vendor-a63514bff922c4c7f9211ecf9cf9a95c.js",
"assets/vendor.map": "assets/vendor-4548cf25b0650519a3bf0fcebb824d59.map", % ls dist/assets/ | grep "\.map\|\.js"
test-support-dbb5b19fdf03c2859ae16e7a1dc9f707.js
test-support-dbb5b19fdf03c2859ae16e7a1dc9f707.map
vendor-a63514bff922c4c7f9211ecf9cf9a95c.js
vendor-a63514bff922c4c7f9211ecf9cf9a95c.map Using 4.0.1 // assetMap.json
"assets/test-support.js": "assets/test-support-89a301f350d8c442d70b96cac2dc78ea.js",
"assets/test-support.map": "assets/test-support-88005702a86610103bf026f97bdad64c.map",
"assets/vendor.js": "assets/vendor-bf70bec9c3a1a3e083ff253e401d322a.js",
"assets/vendor.map": "assets/vendor-db69401ed5c970a866ea1dc33e0fa8b5.map", % ls dist/assets/ | grep "\.map\|\.js"
test-support-88005702a86610103bf026f97bdad64c.map
test-support-89a301f350d8c442d70b96cac2dc78ea.js
vendor-bf70bec9c3a1a3e083ff253e401d322a.js
vendor-db69401ed5c970a866ea1dc33e0fa8b5.map And here is my relevant configs from ember-cli-build.js {
fingerprint: {
enabled: true,
prepend: '[our cdn]',
generateAssetMap: true,
extensions: [
'js', 'css', 'png', 'jpg', 'gif', 'map', // defaults
'ico', 'svg', 'woff', 'woff2', 'ogg' // added by us
],
exclude: [
'assets/inline_svg/**/*',
'assets/dynamic/*'
]
},
sourcemaps: {
enabled: true,
},
'ember-cli-terser': {
enabled: true,
terser: {
compress: false,
mangle: true
}
}
} |
We're also seeing a few bugs in 4.0.1 and 4.0.2 and are reverting back to 3.0.0 for that reason. Either the prepended path was missing or it was concatenated incorrectly. |
ESBuild had the same issue here: NullVoxPopuli#61 |
Seeing the same issue here on v4.0.2. Downgrading to v4.0.1 works for me! Sourcemaps referenced as to a relative path Seems like wrong hash is being applied to Console output
|
Using
|
Any update on this issue or how to work around it in the meantime? I'm also running into the error [WARN] (broccoli-terser-sourcemap) "https://my.cdn.com/assets/web-859e1305b1dc366a97b803eec97b4df5.map" referenced in "assets/web-b3eeea38d69cb5b99f35ff8805ab60a3.js" could not be found |
Does the problem still exist if broccoli-terser-sourcemap is upgraded to 4.1.1 in your lockfile? |
@NullVoxPopuli the warning still exists when running Downgrading to |
This came back to bite us a second time - painful! |
The combination of ember-cli-terser 4.0.2, sourcemaps, and asset fingerprinting with the prepend option seems broken. It works with 4.0.1.
The generated sourcemap just has a single file in its "arrays" property. Eg:
{ "sources":["assets/app-24b6516628ce0829b2e18e768cd8ce2b.js"]
, instead of the full list of source files you'd expect.It appears to work correctly if the fingerprint.prepend option is removed.
May be caused by one of these:
97cef3c
8279c89
Is this a known problem? I've downgraded to 4.0.1 for now.
The text was updated successfully, but these errors were encountered: