From 26fb7135605983e775dab39f15fce25213f106b9 Mon Sep 17 00:00:00 2001 From: Jake Archibald Date: Mon, 18 Feb 2019 13:56:57 +0000 Subject: [PATCH] Fixing windows build. Fixes #465 --- webpack.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index fe52f705..d7536e30 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -17,6 +17,8 @@ const CrittersPlugin = require('critters-webpack-plugin'); const AssetTemplatePlugin = require('./config/asset-template-plugin'); const addCssTypes = require('./config/add-css-types'); +const regexpPathSep = path.sep === '\\' ? '\\\\' : '/'; + function readJson (filename) { return JSON.parse(fs.readFileSync(filename)); } @@ -172,7 +174,7 @@ module.exports = async function (_, env) { plugins: [ new webpack.IgnorePlugin( /(fs|crypto|path)/, - new RegExp(`${path.sep}codecs${path.sep}`) + new RegExp(`${regexpPathSep}codecs${regexpPathSep}`) ), // Pretty progressbar showing build progress: