Skip to content
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

Merged
merged 10 commits into from
Apr 26, 2022

Conversation

salleyliu
Copy link

@salleyliu salleyliu commented Apr 26, 2022

This PR will merge all add files in react-scripts:

  • Add all files in backpack-addons
  • Add js.html and css.html in config
  • Add getCSSModuleLocalIdentWithProjectName.js in utils

name: isEnvDevelopment,
cacheGroups: bpkReactScriptsConfig.vendorsChunkRegex
? {
defaultVendors: {
Copy link
Author

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],
Copy link
Author

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],
Copy link
Author

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.

Copy link

@jaysonwu991 jaysonwu991 left a 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/externals.js Outdated Show resolved Hide resolved
packages/react-scripts/backpack-addons/runtimeChunk.js Outdated Show resolved Hide resolved
packages/react-scripts/backpack-addons/ssr/statusFile.js Outdated Show resolved Hide resolved
packages/react-scripts/backpack-addons/ssr/forkSsr.js Outdated Show resolved Hide resolved
packages/react-scripts/backpack-addons/cssModules.js Outdated Show resolved Hide resolved
packages/react-scripts/backpack-addons/README.md Outdated Show resolved Hide resolved
Copy link

@paultan2021 paultan2021 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@salleyliu salleyliu merged commit e966830 into fork_cra5 Apr 26, 2022
@olliecurtis olliecurtis deleted the fork_rebase_part1 branch October 10, 2023 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants