1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Make sure externals logic works on Windows. (#3677)

This commit is contained in:
Arunoda Susiripala 2018-02-05 13:40:55 +05:30 committed by Tim Neutkens
parent b8f189f2a5
commit 863d4d3b4f

View file

@ -71,7 +71,7 @@ function externalsConfig (dir, isServer) {
}
// Webpack itself has to be compiled because it doesn't always use module relative paths
if (res.match(/node_modules\/.*\.js/) && !res.match(/node_modules\/webpack/)) {
if (res.match(/node_modules[/\\].*\.js/) && !res.match(/node_modules[/\\]webpack/)) {
return callback(null, `commonjs ${request}`)
}