Getting error: Uncaught SyntaxError: Unexpected token & after upgrading to 0.5.0
jsfeldman opened this issue · comments
I upgraded from version 0.4.1 to 0.5.0 after npm started complaining about it failing the audit, but I get this error Uncaught SyntaxError: Unexpected token &
in the console. The error seems to be occurring on this line. Which the previous version outputted to script.src = '/' + name.slice(1);
but the broken version outputs to script.src = '/' + name.slice(1)
.
Could it be due to something else in my build configuration? I'm using nodemon
and the --experimental-modules
flag. Although, I don't think I'm doing anything else out of the ordinary that would cause apostrophes to become escaped.
Sorry I can't provide any more information. Let me know if you're not able to reproduce it, or if any other information could be useful.
I'm having this issue too. It looks like 0.5.0 has switched to using ejs for the loader template and it's escaping the single quotes used when publicPath
is set.
The more worrying part of this is that the code for 0.5.0 doesn't seem to be pushed to this repo. This is a great way to backdoors to sneak into build tools.
You are right I did switch to ejs and apparently forgot to push. Apologies!
I’ll fix that and then take a look at the escaping issue :)
master
and v0.5.0
tag is pushed. Apologies for failing to do that.
Added a test for publicPath
usage and fixe the ejs template.
v0.5.1 should work for you! Please re-open if not.
Thank you!