Skip to content

Webpack 5 support overview #9994

Closed

Description

@raix

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

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

  1. 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?

  2. 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)

  3. jasonwilliams commented on Nov 5, 2020

    @jasonwilliams
    Contributor

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

  4. 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)

  5. 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.

  6. 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

  7. jasonwilliams commented on Nov 17, 2020

    @jasonwilliams
    Contributor

    @iansu can we pin this issue?

  8. jasonwilliams commented on Nov 20, 2020

    @jasonwilliams
    Contributor

    @raix #10121 for the formatting

  9. jasonwilliams commented on Nov 26, 2020

    @jasonwilliams
    Contributor

    chalk is only being used for 1 function here https://github.com/facebook/create-react-app/blob/master/packages/react-dev-utils/formatWebpackMessages.js#L83

    The problem is its being bundled into client side builds. Is it worth keeping for that 1 function?
    If we choose to keep it, whoever uses formatWebpackMessages will need to prune it from client side builds going forward.

    @iansu can we remove it? It causes more problems than it solves (its only used for coloring the text on the terminal)

  10. jasonwilliams commented on Nov 26, 2020

    @jasonwilliams
    Contributor
  11. shellscape commented on Dec 2, 2020

    @shellscape

    An update for you all here: shellscape/webpack-manifest-plugin#222 (comment)

    FWIW the 3.0 RC has basically been tossed out the window and I'm reapplying fixes in there atop the refactored codebase.

  12. raix commented on Dec 4, 2020

    @raix
    ContributorAuthor

    @jasonwilliams not sure about the process - the global should be defined from .env + environment variables already (I didn't experience any issue there - the only thing is about chalk not being browser compliant)

  13. jasonwilliams commented on Dec 4, 2020

    @jasonwilliams
    Contributor

    it’s not defined in the browser, removing chalk may fix it

  14. 89 remaining items

  15. raix commented on Jul 27, 2021

    @raix
    ContributorAuthor

    @xyy94813 we aim to not have breaking changes, that said webpack 5 no longer shim nodejs builtin packages - if you depend on backend or certain polymorphic packages it might be a problem (likely in most builds depending on wp5 or rollup)

  16. acomanescu commented on Jul 28, 2021

    @acomanescu

    @raix Any news on the alpha release?

  17. raix commented on Jul 28, 2021

    @raix
    ContributorAuthor

    @arobert93 Im waiting for some feedback in the maintainer group, hope to get it cleared out later today on the last parts. (Issue with the hmr and error overlay afaik, and module federation pr)
    Really hope for an alpha ultimo this week 🤞

  18. p0wline commented on Aug 3, 2021

    @p0wline

    @raix did you get the feedback you were waiting for last week ?

  19. raix commented on Aug 3, 2021

    @raix
    ContributorAuthor

    Yes, it's down to @iansu or @mrmckeb to cut the alpha release - I've defered some feedback into v5 issues for further discussions in order for us to push the alpha out asap.

  20. unpinned this issue on Aug 4, 2021
  21. p0wline commented on Aug 26, 2021

    @p0wline

    Hello,
    When is the next release including this fix planned please ?
    I'm really looking forward to use WP5 in my project using CRACO 🙏🏼
    Thanks.

  22. fengerzh commented on Aug 26, 2021

    @fengerzh

    @phochard When all these issues closed. https://github.com/facebook/create-react-app/milestone/81

  23. FezVrasta commented on Sep 16, 2021

    @FezVrasta
    Contributor

    Can the community help somehow? It seems like most of the PRs listed in the milestone are ready to be merged.

  24. agusterodin commented on Sep 19, 2021

    @agusterodin

    Hey, I hate to beat a dead horse but does someone have plans to get a beta release out any time soon? I would be infinitely grateful for a yes or no.

    A no is perfectly acceptable, it would just be nice to know. Nobody owes us anything and we all owe a lot of appreciation to the hard work the maintainers have put in since CRA started.

    That being said, it is very hard to plan a technical direction for a project without knowing the fate of one of your key dependencies. Transitioning to Next is a really safe bet at this point in time, especially given the comments Dan Abramov recently made about the state of CRA but transitioning is a very heavy lift for many apps.

  25. MrEfrem commented on Oct 21, 2021

    @MrEfrem

    @agusterodin what comments did Dan Abramov leave about state of CRA? I’m just curious because I don’t like performance Webpack 4 too. And I’d like to know about future CRA.

  26. dons20 commented on Oct 21, 2021

    @dons20

    @agusterodin I've been following this discussion, not sure if this helps, but it seems like some activity is going on. #11278

  27. MrEfrem commented on Oct 22, 2021

    @MrEfrem

    @agusterodin I've been following this discussion, not sure if this helps, but it seems like some activity is going on. #11278

    Yes, there’s life. It’s very good.

  28. agusterodin commented on Oct 22, 2021

    @agusterodin

    @agusterodin what comments did Dan Abramov leave about state of CRA? I’m just curious because I don’t like performance Webpack 4 too. And I’d like to know about future CRA.

    #11180 (comment)

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

    No branches or pull requests

    Issue actions