Skip to content

Commit 5c74bb7

Browse files
authored
chore: define process in webpack (#556)
1 parent 2f2f432 commit 5c74bb7

File tree

3 files changed

+3263
-2935
lines changed

3 files changed

+3263
-2935
lines changed

packages/adena-extension/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
"jest": "^29.7.0",
6363
"jest-environment-jsdom": "^29.7.0",
6464
"prettier": "^3.2.5",
65+
"process": "^0.11.10",
6566
"storybook": "^7.6.17",
6667
"style-loader": "^3.3.4",
6768
"ts-jest": "^29.1.2",

packages/adena-extension/webpack.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const HtmlWebPackPlugin = require('html-webpack-plugin');
55
const CopyWebPackPlugin = require('copy-webpack-plugin');
66
const CleanWebPackPlugin = require('clean-webpack-plugin').CleanWebpackPlugin;
77
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
8+
const { ProvidePlugin } = require('webpack');
89

910
const config = {
1011
devtool: 'cheap-module-source-map',
@@ -121,6 +122,9 @@ const config = {
121122
filename: 'popup.html',
122123
}),
123124
new NodePolyfillPlugin(),
125+
new ProvidePlugin({
126+
process: 'process/browser.js',
127+
}),
124128
],
125129
};
126130

0 commit comments

Comments
 (0)