Skip to content

Webpack 5 support overview #9994

@raix

Description

@raix
Contributor

Overview of tasks needed for updating CRA to Webpack 5 - Some of the work will support both Webpack 4 + 5 but some plugins only support Webpack 5 + the webpack config itself has breaking changes.

Prerequisites

  • Move ESLint cache file into node_modules #9977 Move .eslintcache into .cache (part of fixing test suite)
    Fix CI tests #10217 Fix CRA test suite to validate the pull-requests for Webpack 5 changes

Loaders / plugins [multiple pull-requests]

Webpack 5 specific [single pull-request #10961 to wp5 branch]

Remaining work on the wp5 branch

Webpack 5 maybe later?

  • webpack-dev-server is currently in v4.0.0-beta.3 for webpack 5 support (v3.x also seem to work?)

Regarding federated modules:
* [ ] The Webpack dev server doesn't yet support federated modules so we'll likely have to wait a bit on that.
Out of scope - read more in #9510

References:

Notes:

  • We are currently trying to not include node js builtin shims, it's potentially a breaking change if using packages meant for backend usage or mixed frontend/backend packages. (it happens that newcommers to Npm include backend packages in their frontend code, would be great to prevent this)
  • PnP is supported as default in Webpack 5 and fork-ts-checker-webpack-plugin as I read it - but it would be great to QA / fix the tests

Activity

jasonwilliams

jasonwilliams commented on Nov 4, 2020

@jasonwilliams
Contributor

pnp plugin won't be needed once you upgrade to Webpack 5, so maybe you can remove it as part of the single PR
https://webpack.js.org/migrate/5/#clean-up-configuration

What pnp tests are broken?

raix

raix commented on Nov 5, 2020

@raix
ContributorAuthor

@jasonwilliams cool, I'll strike out the PnP task - regarding tests it's the yarn docker:e2e --test-suite I think it was e2e-installs (one of them ends with a PnP test that breaks when testing locally, but more tests are actually breaking atm. I have a stash for fixing the simple test when I need it)

jasonwilliams

jasonwilliams commented on Nov 5, 2020

@jasonwilliams
Contributor

@raix do you need help on anything? Looks like its just PRs waiting to be reviewed

raix

raix commented on Nov 5, 2020

@raix
ContributorAuthor

@jasonwilliams I think if the simple e2e test passes it should be good to complete (unfortunately for the tests to run there is missing support for the new JSX babel transformation when testing + .eslintcache needs to be git ignored in each of the templates)

raix

raix commented on Nov 9, 2020

@raix
ContributorAuthor

@jasonwilliams I need to QA 3 of the pr's and address review comments in 10005 / I'll likely only get to those comments in the weekend, if you have time feel free to jump in to QA/resolve comments or make pr's the other updates.

jasonwilliams

jasonwilliams commented on Nov 14, 2020

@jasonwilliams
Contributor

@raix theres some I looked at, how are you testing? Are you linking the repo then launching with npx? I know nothing about tap so couldn’t do much on the forkTsChecker one

167 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

    Development

    Participants

    @andriijas@shellscape@gausie@einarq@InSuperposition

    Issue actions

      Webpack 5 support overview · Issue #9994 · facebook/create-react-app