Skip to content

Commit 62955e3

Browse files
committed
fix browser tests for webpack 5
1 parent b9a1231 commit 62955e3

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@
154154
"object-hash": "^2.0.1",
155155
"pa11y-ci": "^2.4.0",
156156
"prettier": "^2.1.2",
157+
"process": "^0.11.10",
157158
"puppeteer": "^5.5.0",
158159
"replace": "^1.2.0",
159160
"robots-parser": "^2.1.1",

webpack.config.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const path = require('path')
22
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
33
const CopyWebpackPlugin = require('copy-webpack-plugin')
4-
const { EnvironmentPlugin } = require('webpack')
4+
const { EnvironmentPlugin, ProvidePlugin } = require('webpack')
55
const { reactBabelOptions } = require('./lib/react/babel')
66

77
module.exports = {
@@ -88,7 +88,11 @@ module.exports = {
8888
]
8989
}),
9090
new EnvironmentPlugin({
91-
NODE_ENV: 'development' // use 'development' unless process.env.NODE_ENV is defined
91+
NODE_ENV: 'development', // use 'development' unless process.env.NODE_ENV is defined
92+
DEBUG: false,
93+
}),
94+
new ProvidePlugin({
95+
process: 'process/browser',
9296
})
9397
]
9498
}

0 commit comments

Comments
 (0)