Closed fregante closed 1 year ago
The only difference I see is that Parcel stopped encoding some strings, or potentially decoded some incorrectly. Here's the diff between the two files. Green is the good version, 2.6.2:
To note:
utf8CheckExtraBytes
)Those characters for example come from:
My current solution:
ascii_only
in Terser (fixes build
)watch
)# .terserrc
{
"output": {
"ascii_only": true
}
}
Just ran into this randomly π€, I'm on version 2.9.3
I confirm it's still an issue for both watch and build in 2.9.3
The only difference I see is that Parcel stopped encoding some strings, or potentially decoded some incorrectly. Here's the diff between the two files.
The question is: which characters does Chrome not like here? Maybe try by replacing οΏ½
with \ufffd
for a start and seeing if that fixes it already, or if there is more (like the βοΈ
I saw in your diff)
swc emits οΏ½
for that input, but that in itself should be fine.
I tried making a few replacements but I wasn't able to identify which/all breaking characters. The main issue here is that Parcel is actively replacing unicode sequences with their unicode equivalents. See the source here:
Which appears to be:
var nonWS = [
"\x85",
- "β",
- "οΏ½"
+ "\u200B",
+ "\uFFFE"
].join("");
As you see, the \u
strings appear that way in the source
@fregante What do you think of the following solution?
output.ascii_only
to keep the escape sequences in build modeSounds perfectly fine for me
π bug report
Starting in v2.7, parcel started generating an invalid extension and I can't quite figure out why.
π Configuration (.babelrc, package.json, cli command)
π― Current Behavior
When loading the extension into Chrome, the browser fails with this error:
π» Code Sample
Checkout https://github.com/pixiebrix/webext-messenger/tree/e5aee47f4c684b29cf75229f68ef3aa1de6599c5
Then load the extension from the
dist
folder into Chrome, for example by running this in the root:You can downgrade parcel to "fix" the issue:
π Your Environment