Fixing windows build. Fixes #465

This commit is contained in:
Jake Archibald
2019-02-18 13:56:57 +00:00
parent e801170496
commit 26fb713560

View File

@@ -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: