Skip to content

Commit d60d8f5

Browse files
committed
fix: react dependency issues
1 parent 6c22ef5 commit d60d8f5

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@takingitglobal/a11ize",
33
"repository": "https://github.com/takingitglobal/a11ize.git",
4-
"main": "src/index.js",
4+
"main": "dist/bare/index.js",
55
"jsdelivr": "dist/with-react-cjs/index.js",
66
"version": "0.0.0-development",
77
"description": "A React and JS Accessibility Toolkit",
@@ -19,16 +19,18 @@
1919
"access": "public"
2020
},
2121
"dependencies": {
22-
"@babel/runtime": "^7.11.2",
22+
},
23+
"peerDependencies": {
2324
"classnames": "^2.2.6",
24-
"core-js": "3",
25-
"prop-types": "^15.7.2",
2625
"react": "^16.13.1",
2726
"react-dom": "^16.13.1",
28-
"react-icons": "^3.11.0"
27+
"react-icons": "^3.11.0",
28+
"prop-types": "^15.7.2"
2929
},
3030
"sideEffects": false,
3131
"devDependencies": {
32+
"@babel/runtime": "^7.11.2",
33+
"core-js": "3",
3234
"@babel/cli": "^7.10.5",
3335
"@babel/core": "^7.11.4",
3436
"@babel/plugin-transform-runtime": "^7.11.5",

webpack.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ module.exports = [
1515
externals: [nodeExternals()],
1616
output: {
1717
filename: 'index.js',
18-
library: 'a11ize',
19-
libraryTarget: 'umd',
18+
libraryTarget: 'commonjs2',
2019
path: path.join(__dirname, '/dist/bare'),
2120
},
2221
plugins: [new CleanWebpackPlugin()],
@@ -102,6 +101,7 @@ module.exports = [
102101
library: 'a11ize',
103102
libraryTarget: 'umd',
104103
path: path.join(__dirname, '/dist/with-react'),
104+
globalObject: 'this',
105105
},
106106
resolve: {
107107
mainFields: ['module', 'main'],
@@ -195,6 +195,7 @@ module.exports = [
195195
library: 'a11ize',
196196
libraryTarget: 'umd',
197197
path: path.join(__dirname, '/dist/with-react-cjs'),
198+
globalObject: 'this',
198199
},
199200
resolve: {
200201
mainFields: ['module', 'main'],

0 commit comments

Comments
 (0)