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

Webpack 5 #11201

Merged
merged 35 commits into from Aug 4, 2021
Merged

Webpack 5 #11201

merged 35 commits into from Aug 4, 2021

Conversation

raix
Copy link
Contributor

@raix raix commented Jul 12, 2021

WP5 branch

  • Updating webpack to v5
  • Update dependencies related to webpack 5
  • Update postcss to v8
  • Fix eslint shareable config to be self contained regarding dependencies
  • Testing Webpack 5 error overlay instead of the CRA overlay (ref: outstanding formatting issue)

Breaking changes:

  • No node js builtin shims (breaking as in Webpack 5)
  • Removed WatchMissingNodeModulesPlugin
  • Dropped node v10 + v12 support
  • Webpack Development Server pathname default is now "/ws" (prev: '/sockjs-node')

Closing #9994

raix and others added 2 commits May 28, 2021 09:32
* Revert "Revert "Update postcss packages" (#10216)"

This reverts commit 3968923.

* Revert "Update postcss packages" (#10216)

This reverts commit 580ed5d.

* Update postcss and loader

* Update fork-ts-checker-webpack-plugin@5.2.1

References:
* [hook rename](TypeStrong/fork-ts-checker-webpack-plugin#490)
* [include/exclude](TypeStrong/fork-ts-checker-webpack-plugin#450) and [issue options](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin#issues-options)
* [release notes 5.0.0](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/releases/tag/v5.0.0)

* Update fork-ts-checker-webpack-plugin 6.0.5

* Add css-minimizer-webpack-plugin@1.1.5 remove

Add css-minimizer-webpack-plugin@1.1.5
Remove optimize-css-assets-webpack-plugin and postcss-safe-parser

References:
* https://webpack.js.org/plugins/css-minimizer-webpack-plugin/

* Add support for Webpack 5 message objects

* Update WebpackManifestPlugin to v3.0.0

* Support both "SingleEntryPlugin" and "EntryPlugin"

* Support Webpack 5 IgnorePlugin signature

Reference:
* https://webpack.js.org/plugins/ignore-plugin/#example-of-ignoring-moment-locales
* #10006

* Update webpack and dev server

* Enable persistent cache

* Fix react-error-overlay webpack

* Fix dev server config

* Remove support for SingleEntryPlugin

* update workbox-webpack-plugin

* Fix post css config

* Comment out WebpackManifestPlugin for now having issues with undefined path

* Add fast refresh entries to ModuleScopePlugin

* Format files

* Remove unused variables in start command

* git ignore tsconfig.tsbuildinfo
supporting incremental typescript builds

* simplify output path

review feedback from @kumarlachhani

* Use asset modules in react-scripts

* Use asset modules in react-error-overlay

* eslint-config-react-app typo fix (#10317)

This just fixes a shell snippet in the readme file for this plugin

* Fix link address (#10907)

Replace the Github home link with a link to the repo's main page or a link to the source (https://github.com/CodeByZach/pace/blob/master/pace.js)

* Bump immer version for fixing security issue (#10791)

Bump immer minor version to fix `Prototype Pollution` Security issue.

* test(create-react-app): add integration tests (#10381)

* Revert "Use asset modules in react-error-overlay"

This reverts commit 952f896.

* Disable broken tests for now

* Revert source-map bump in react-error-overlay

* JSON is using default export

* Webpack config: Remove invalid parser configuration

* Fix issue with ModuleScope and babel runtime

* Fix svgr configuration

* Webpack config svg use file-loader instead of url-loader

* Update postcss-normalize

* Fix asset output name

* Update test matrix using node 12+14

postcss normalize only support node >=12

* Fix file output extension

* Align assetModuleFilename

* pipeline update configuration names

* Add back webpack-manifest-plugin

* Fix kitchen sink get actual href value

.href is prefixed with http://localhost etc.

* Update kitchen sink test to webpack 5 asset modules

* Let webpack handle global this

* Fix eject copy config/webpack/persistentCache folder

* Move tsbuildinfo into cache folder

* Update dependencies

* Update webpack-dev-server to beta.3

* Compilation.modules changed to type Set

reference: comment by @slorber #9994 (comment)

* Format JsonInclusion.js using prettier

* Run prettier on webpack dev server config

* Enable e2e behavior tests using node 12+14

* Comment out e2e behavior tests for now

* Add experimental support for module federation

* Fix missing wds socket path update

accordingly to review by @xiaokekeT

* Revert "Add experimental support for module federation"

This reverts commit 8fdc63b.

Co-authored-by: Ian Schmitz <ianschmitz@gmail.com>
Co-authored-by: jasonwilliams <jase.williams@gmail.com>
Co-authored-by: Joseph Atkins-Turkish <spacerat3004@gmail.com>
Co-authored-by: e-w-h <46170930+e-w-h@users.noreply.github.com>
Co-authored-by: Shamprasad RH <shamprasad.rh@mail.weir>
Co-authored-by: James George <jamesgeorge998001@gmail.com>
.github/workflows/integration.yml Outdated Show resolved Hide resolved
.github/workflows/integration.yml Outdated Show resolved Hide resolved
azure-pipelines-test-job.yml Outdated Show resolved Hide resolved
Copy link
Contributor

@iansu iansu left a comment

Choose a reason for hiding this comment

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

Looks pretty good. I had a few questions and noticed there are some conflicts. Let's get this merged as soon as we can and get an alpha release out.

azure-pipelines.yml Show resolved Hide resolved
packages/react-scripts/config/pnpTs.js Show resolved Hide resolved
packages/react-scripts/scripts/start.js Show resolved Hide resolved
@mrmckeb
Copy link
Contributor

mrmckeb commented Jul 14, 2021

This is looking great. @iansu and I left a few comments, and also wanted to note that we merged this:
#11105

There are a few conflicts, but it looks like 95% of those are just version-related.

@kryptonitechic
Copy link

5 /prouh

  • ouna de lay Rojo bekino tegak / l pitch Zain mothe on

@raix raix added this to the 5.0 milestone Jul 16, 2021
@raix raix linked an issue Jul 16, 2021 that may be closed by this pull request
25 tasks
Morten N.O. Henriksen added 7 commits July 16, 2021 11:15
…ized

Would be great with wildcard support in ModuleScopePlugin
Warning: Ubuntu 16.04 LTS environment is deprecated and will be removed on September 20, 2021. Migrate to ubuntu-latest instead. For more details, see actions/runner-images#3287
this should be the default already in webpack 5 - to enable require ensure use https://webpack.js.org/plugins/internal-plugins/#requireensureplugin
On v4.14.1 linux tests failed: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime
@moroine
Copy link

moroine commented Nov 22, 2021

Hey, is there any plan for the v5 release?

@yzy111
Copy link

yzy111 commented Nov 23, 2021

Hey,why did you remove the hot update configuration
image

@raix
Copy link
Contributor Author

raix commented Nov 23, 2021

@moroine yes, we will upgrade eslint to version 8 and do a final update of dependency versions and do one final pre release to test it out.

@yzy111 not sure what you mean - we removed the usage of the CRA error overlay in favor of the webpack version (rather maintain one in the community)
Doing that removes the need for a custom hmr client etc. So reducing complexity in the CRA configs/codebase.

Taillook added a commit to Taillook/storybook that referenced this pull request Dec 15, 2021
@t0x1c123
Copy link

Hi can I ask why did you removed? Thanks

 splitChunks: {
        chunks: 'all',
        name: isEnvDevelopment,
      },

Copy link

@sayedali2020 sayedali2020 left a comment

Choose a reason for hiding this comment

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

@abasahebgaware
Copy link

Can't resolve 'fs' in '{project_path}\node_modules\yamljs\lib'

getting this error after upgrade react-scripts to v5

abhiisheek pushed a commit to abhiisheek/create-react-app that referenced this pull request May 24, 2023
Co-authored-by: Ian Schmitz <ianschmitz@gmail.com>
Co-authored-by: jasonwilliams <jase.williams@gmail.com>
Co-authored-by: Joseph Atkins-Turkish <spacerat3004@gmail.com>
Co-authored-by: e-w-h <46170930+e-w-h@users.noreply.github.com>
Co-authored-by: Shamprasad RH <shamprasad.rh@mail.weir>
Co-authored-by: James George <jamesgeorge998001@gmail.com>
Copy link

@emanisay27 emanisay27 left a comment

Choose a reason for hiding this comment

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

Helooo

@emanisay27
Copy link

Hi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Webpack 5 support overview