-
Notifications
You must be signed in to change notification settings - Fork 31
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
[LEOP-287]Apply all customize features to CRA5-Part1 #144
Conversation
name: isEnvDevelopment, | ||
cacheGroups: bpkReactScriptsConfig.vendorsChunkRegex | ||
? { | ||
defaultVendors: { |
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.
in webpack5: optimization.splitChunks.cacheGroups.vendors → optimization.splitChunks.cacheGroups.defaultVendors
case 'css': | ||
return { | ||
and: [cssRegex, () => !cssModulesEnabled], | ||
not: [backpackModulesRegex, scopedBackpackModulesRegex], |
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.
Accroding webpack5 Rule.exclude and Rule.include: If you supply a Rule.exclude option, you cannot also supply a Rule.resource(and, not, or )
So I'm going to change exclude
here to not
case 'sass': | ||
return { | ||
and: [sassRegex, () => !cssModulesEnabled], | ||
not: [backpackModulesRegex, scopedBackpackModulesRegex], |
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.
Same above. I'm going to change exclude
here to not
.
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.
Need to check the formation of each file and make sure it is easy to understand.
packages/react-scripts/backpack-addons/ssr/customWebpackUtils.js
Outdated
Show resolved
Hide resolved
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.
LGTM
This PR will merge all add files in react-scripts: