Skip to content

[LEOP-287]Apply all customize features to CRA5-Part1#144

Merged
salleyliu (salleyliu) merged 10 commits into
fork_cra5from
fork_rebase_part1
Apr 26, 2022
Merged

[LEOP-287]Apply all customize features to CRA5-Part1#144
salleyliu (salleyliu) merged 10 commits into
fork_cra5from
fork_rebase_part1

Conversation

@salleyliu

@salleyliu salleyliu (salleyliu) commented Apr 26, 2022

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@jaysonwu991 Jayson Wu (jaysonwu991) left a comment

Copy link
Copy Markdown

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.

Comment thread packages/react-scripts/backpack-addons/babelIncludePrefixes.js Outdated
Comment thread packages/react-scripts/backpack-addons/crossOriginLoading.js Outdated
Comment thread packages/react-scripts/backpack-addons/externals.js Outdated
Comment thread packages/react-scripts/backpack-addons/ignoreCssWarnings.js Outdated
Comment thread packages/react-scripts/backpack-addons/runtimeChunk.js Outdated
Comment thread packages/react-scripts/backpack-addons/ssr/statusFile.js Outdated
Comment thread packages/react-scripts/backpack-addons/ssr/forkSsr.js Outdated
Comment thread packages/react-scripts/backpack-addons/ssr/customWebpackUtils.js Outdated
Comment thread packages/react-scripts/backpack-addons/cssModules.js Outdated
Comment thread packages/react-scripts/backpack-addons/README.md Outdated
Comment thread packages/react-scripts/config/css.html
Comment thread packages/react-scripts/config/css.html Outdated

@paultan2021 paul-tan (paultan2021) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@salleyliu salleyliu (salleyliu) merged commit e966830 into fork_cra5 Apr 26, 2022
@olliecurtis Ollie Curtis (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