Added webpack.ProvidePlugin for most used imports
Removed imports of React, connect, PropTypes throughout Removed the "React" in React.Component/PureComponent
This commit is contained in:
@@ -66,6 +66,13 @@ module.exports = {
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new webpack.ProvidePlugin({
|
||||
React: 'react',
|
||||
Component: ['react', 'Component'],
|
||||
PureComponent: ['react', 'PureComponent'],
|
||||
connect: ['react-redux', 'connect'],
|
||||
PropTypes: 'prop-types',
|
||||
}),
|
||||
new webpack.EnvironmentPlugin(JSON.parse(JSON.stringify(env))),
|
||||
new webpack.NormalModuleReplacementPlugin(
|
||||
/^history\//, (resource) => {
|
||||
|
||||
Reference in New Issue
Block a user