mirror of https://github.com/linkerd/linkerd2.git
Reduce webpack bundle size: remove react prop types in production builds (#2036)
* Remove react prop types in production builds Use babel-plugin-transform-react-remove-prop-types to slim down the production build
This commit is contained in:
parent
a397393996
commit
884ae67314
|
|
@ -1,5 +1,8 @@
|
|||
{
|
||||
"presets": [
|
||||
"env", "react-app"
|
||||
]
|
||||
"env": {
|
||||
"production": {
|
||||
"plugins": ["transform-react-remove-prop-types"]
|
||||
}
|
||||
},
|
||||
"presets": ["react-app"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import 'whatwg-fetch';
|
||||
import { attr, call, select, selectAll } from 'd3-selection';
|
||||
import { forceCenter, forceLink, forceManyBody, forceSimulation } from 'd3-force';
|
||||
import { select, selectAll } from 'd3-selection';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import _get from 'lodash/get';
|
||||
|
|
@ -17,8 +17,6 @@ import withREST from './util/withREST.jsx';
|
|||
const d3 = Object.assign(
|
||||
{},
|
||||
{
|
||||
attr,
|
||||
call,
|
||||
drag,
|
||||
forceCenter,
|
||||
forceLink,
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
"babel-jest": "23.6.0",
|
||||
"babel-loader": "7.1.4",
|
||||
"babel-plugin-import": "1.7.0",
|
||||
"babel-plugin-transform-react-remove-prop-types": "^0.4.21",
|
||||
"babel-preset-env": "1.7.0",
|
||||
"babel-preset-react-app": "3.1.1",
|
||||
"babel-runtime": "^6.26.0",
|
||||
|
|
|
|||
|
|
@ -1333,6 +1333,11 @@ babel-plugin-transform-react-jsx@6.24.1, babel-plugin-transform-react-jsx@^6.24.
|
|||
babel-plugin-syntax-jsx "^6.8.0"
|
||||
babel-runtime "^6.22.0"
|
||||
|
||||
babel-plugin-transform-react-remove-prop-types@^0.4.21:
|
||||
version "0.4.21"
|
||||
resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-remove-prop-types/-/babel-plugin-transform-react-remove-prop-types-0.4.21.tgz#0087938f4348cb751b3e5055a6b38f3c61b5231b"
|
||||
integrity sha512-+gQBtcnEhYFbMPFGr8YL7SHD4BpHifFDGEc+ES0+1iDwC9psist2+eumcLoHjBMumL7N/HI/G64XR5aQC8Nr5Q==
|
||||
|
||||
babel-plugin-transform-regenerator@6.26.0, babel-plugin-transform-regenerator@^6.22.0:
|
||||
version "6.26.0"
|
||||
resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f"
|
||||
|
|
|
|||
Loading…
Reference in New Issue