-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Analyze bundle size & decrease the size of main.js #248
Conversation
config/webpack.config.prod.js
Outdated
openAnalyzer: true, | ||
generateStatsFile: false, | ||
statsFilename: 'stats.json', | ||
statsOptions: null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default it's null
. We can omit this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Fixed.
config/webpack.config.prod.js
Outdated
defaultSizes: 'parsed', | ||
openAnalyzer: true, | ||
generateStatsFile: false, | ||
statsFilename: 'stats.json', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As generateStatsFile
is false
it wont create a file name stats.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
…es & react-style-proptype in prod
e82cd62
to
b84efbd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
.babelrc
Outdated
@@ -5,7 +5,16 @@ | |||
], | |||
"plugins": [ | |||
"@babel/plugin-proposal-class-properties", | |||
"@babel/plugin-syntax-dynamic-import" | |||
"@babel/plugin-syntax-dynamic-import", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be added to
"env": {
"production": {
"plugins": [...]
}
}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tomegz Do you mean @babel/plugin-syntax-dynamic-import
or transform-react-remove-prop-types
? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry i made it unclear. I meant transform-react-remove-prop-types
- just wondering if it works correctly now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. transform-react-remove-prop-types
should be place in production
part.
I already modified it. Thanks!
…size Analyze bundle size & decrease the size of main.js
to