Skip to content

Commit

Permalink
babel plugin docgen added to webpack config (#85)
Browse files Browse the repository at this point in the history
* babel plugin docgen added to webpack config

* babel-plugin-react-docgen in webpack prod
  • Loading branch information
DushanT authored and adammockor committed Mar 4, 2019
1 parent 63436fa commit 1a1f274
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/react-scripts/config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ module.exports = {
// This is a feature of `babel-loader` for webpack (not Babel itself).
// It enables caching results in ./node_modules/.cache/babel-loader/
// directory for faster rebuilds.
plugins: [require.resolve('babel-plugin-react-docgen')],
cacheDirectory: true,
},
},
Expand Down
1 change: 1 addition & 0 deletions packages/react-scripts/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ module.exports = {
babelrc: false,
presets: [require.resolve('babel-preset-react-app')],
plugins: [
[require.resolve('babel-plugin-react-docgen')],
[
require('babel-plugin-transform-react-remove-prop-types')
.default,
Expand Down
1 change: 1 addition & 0 deletions packages/react-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"babel-eslint": "8.2.5",
"babel-jest": "23.2.0",
"babel-loader": "7.1.4",
"babel-plugin-react-docgen": "~2.0.2",
"babel-plugin-transform-react-remove-prop-types": "~0.4.13",
"babel-preset-react-app": "3.1.2",
"babel-runtime": "6.26.0",
Expand Down

0 comments on commit 1a1f274

Please sign in to comment.