Open alvarocastro opened 1 month ago
Replying to myself in case anyone stumbles with the same issue.
Excluding the file from fingerprinting solves the issue (altho the css won't be fingerprinted)
// ember-cli-build.js
let app = new EmberAddon(defaults, {
fingerprint: {
exclude: [
'style'
]
},
// ...
Maybe another solution would be to just change the file name to something less chashing, but would need to explore how to do that.
Noticed the rewrite is replacing an instance of "style.css" where it shouldn't.
It happens with this piece of code: (it's a dependency of my project, prosemirror-view)
In the pointed line, looks like the
"style.css"
part of the string is being matched and replaced with the fingerprinted one, ending up looking like this: (for some reason, the other lines are not being matched and stay as they should)This not only changes the purpose of the code (it's a subtraction now) but also breaks the terser because it's bad js syntax (variable starts with a number) and get this error:
Update: this seems to be happening after code minification. This is the same function as above but after:
The matcher here for
assetPath="style.css"
seems to be matching with this parte.style.cssText;e.style.cs
and then replaces the "style.css" part with "style-THEHASH.css"Any workaround for this? I have no idea how all of this works this is the first time I dig this deep into broccoli and the ember build process.