From ec5d1648377b756a02cfbfea4e94ddea555e152a Mon Sep 17 00:00:00 2001 From: Yoan VALLET <ext.sopra.yvallet@grandlyon.com> Date: Fri, 28 Aug 2020 14:01:03 +0200 Subject: [PATCH] feat: add webpack config fix for windows --- app.config.environment.dev.js | 2 +- app.config.react.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app.config.environment.dev.js b/app.config.environment.dev.js index d07de287b..893510615 100644 --- a/app.config.environment.dev.js +++ b/app.config.environment.dev.js @@ -23,7 +23,7 @@ const stackProvidedLibsConfig = { module: { rules: [ { - test: /cozy-bar\/dist\/cozy-bar\.min\.js$/, + test: /cozy-bar(\/|\\)dist(\/|\\)cozy-bar\.min\.js$/, // Automatically import the CSS if the JS is imported. // imports-loader@0.8.0 works but imports-loader@1.0.0 does not loader: 'imports-loader?css=./cozy-bar.min.css', diff --git a/app.config.react.js b/app.config.react.js index ad7fba451..5fc8e0046 100644 --- a/app.config.react.js +++ b/app.config.react.js @@ -22,7 +22,7 @@ module.exports = { rules: [ { test: /\.(ts|js)x?$/, // Add TS extensions - exclude: /node_modules\/(?!(cozy-ui))/, + exclude: /node_modules(\/|\\)(?!(cozy-ui))/, loader: require.resolve('cozy-scripts/node_modules/babel-loader'), // Add full path options: { cacheDirectory: 'node_modules/.cache/babel-loader/react', -- GitLab