Skip to content

Commit 10541ea

Browse files
install prop-types and update babel config
1 parent 5970ad2 commit 10541ea

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.babelrc.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,16 @@ const requirePolyfills = process.env.INCLUDE_POLYFILLS;
55
const modules = output == null ? false : output;
66
const options = {
77
presets: [['@babel/env', {loose: true, modules}], '@babel/react'],
8-
plugins: ['@babel/plugin-transform-react-jsx'],
8+
plugins: [
9+
'@babel/plugin-transform-react-jsx',
10+
[
11+
'transform-react-remove-prop-types',
12+
{
13+
mode: 'remove',
14+
ignoreFilenames: ['node_modules'],
15+
},
16+
],
17+
],
918
env: {
1019
test: {
1120
// extra configuration for process.env.NODE_ENV === 'test'

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"@rollup/plugin-commonjs": "^18.0.0",
4848
"@rollup/plugin-node-resolve": "^11.2.1",
4949
"babel-loader": "^8.1.0",
50+
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
5051
"cross-env": "^7.0.3",
5152
"eslint": "^7.27.0",
5253
"eslint-config-prettier": "^8.3.0",
@@ -87,5 +88,8 @@
8788
"setupFilesAfterEnv": [
8889
"jest-extended"
8990
]
91+
},
92+
"dependencies": {
93+
"prop-types": "^15.8.1"
9094
}
9195
}

0 commit comments

Comments
 (0)