Skip to content

Commit 7cc1ab7

Browse files
lbogdanCompuIves
authored andcommitted
Update webpack eslint load-rules config to work on Windows (codesandbox#223)
1 parent b1a4ee0 commit 7cc1ab7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config/webpack.common.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ module.exports = {
210210
// With this plugin we override the load-rules of eslint, this function prevents
211211
// us from using eslint in the browser, therefore we need to stop it!
212212
new webpack.NormalModuleReplacementPlugin(
213-
/eslint\/lib\/load-rules/,
214-
'../../../config/stubs/load-rules.compiled.js'
213+
new RegExp(['eslint', 'lib', 'load-rules'].join(`\\${path.sep}`)),
214+
path.join(paths.config, 'stubs/load-rules.compiled.js')
215215
),
216216

217217
// If you require a missing module and then `npm install` it, you still have

0 commit comments

Comments
 (0)