Skip to content

Commit b39e2db

Browse files
pickymtrAudreyPierrePerrin-Moment
authored
fix(build): add global object "this" for wepback and missing eslint packages (#7)
Co-authored-by: Audrey <[email protected]> Co-authored-by: PierrePerrin-Moment <[email protected]>
1 parent 7145ac6 commit b39e2db

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@
5050
"eslint-config-airbnb-typescript": "^16.1.0",
5151
"eslint-config-prettier": "^8.4.0",
5252
"eslint-plugin-import": "^2.25.4",
53+
"eslint-plugin-jsx-a11y": "^6.5.1",
54+
"eslint-plugin-react": "^7.29.4",
55+
"eslint-plugin-react-hooks": "^4.4.0",
5356
"file-loader": "^6.2.0",
5457
"html-webpack-plugin": "^5.5.0",
5558
"pre-commit": "^1.2.2",

webpack.config.dev.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ module.exports = {
2424
},
2525
output: {
2626
filename: '[name].js',
27-
path: path.resolve(__dirname, 'dist')
27+
path: path.resolve(__dirname, 'dist'),
28+
globalObject: 'this',
2829
},
2930
plugins: [
3031
new HtmlWebpackPlugin({

webpack.config.prod.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ module.exports = {
2020
filename: 'index.js',
2121
path: path.resolve(__dirname, 'dist'),
2222
libraryTarget: 'umd',
23-
clean: true
23+
clean: true,
24+
globalObject: 'this',
2425
}
2526
};

0 commit comments

Comments
 (0)