You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Some paths in webpack configs aren't matched on Windows #453
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
I discovered this bug because routes are named *.chunk.*.js instead of route-*.js in the build output. This happens because Windows' backslash-delimited file paths (e.g. C:\Users\me\dev\project\src\routes\home\index.js aren't matched by these strings and regexes:
There are probably more occurences of this throughout the webpack configs.
If the current behavior is a bug, please provide the steps to reproduce.
preact create default test on Windows
cd test, npm install
npm run build
In the build folder, route chunks aren't prefixed with route-
What is the expected behavior?
In this specific case, routes should be prefixed with route-, like on UNIX systems.
Generally, both / and \-delimited paths should be matched in webpack configs.
Activity
lukeed commentedon Jan 5, 2018
Thanks for this! Can you try the following for me:
jgierer12 commentedon Jan 6, 2018
That doesn't fix it, unfortunately. Relevant PR: nodejs/node#12700.
lukeed commentedon Jan 6, 2018
Ah, thanks! TIL :D Good reason I always avoided posix before.
How about this, the more cumbersome route:
jgierer12 commentedon Jan 6, 2018
It works if I replace
!!~filenamewith!filename(and add the missing bracket).I can work on this myself and submit a PR when I have enough time, if you'd prefer that.
Also, TIL about
~😃lukeed commentedon Jan 6, 2018
Great! You're welcome to open a pull request for that, or else I'll do it later.
Sorry about that lol, on my phone