App: [$250] Upgrade the package webpack to the latest version

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Snyk ID: SNYK-JS-SSRI-1246392
Package: ssri
Version: 6.0.1
Language: js
Date Introduced: 2022-07-04
npm list ssri                                                                                                                                                                                                                                         [18:31:00]
new.expensify@1.1.82-5 /Users/flo/Expensidev/App
├─┬ copy-webpack-plugin@6.2.1
│ └─┬ cacache@15.0.5
│   └── ssri@8.0.1 
└─┬ webpack@4.44.2
  └─┬ terser-webpack-plugin@1.4.5
    └─┬ cacache@12.0.4
      └── ssri@6.0.1 

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 26 (17 by maintainers)

Most upvoted comments

Hey @arielgreen @roryabraham This MR is ready 🚀

@afmire877 Sorry, that PR had a massive amount of unrelated changes. You should only have a few commits changing a reasonable number of files.

Yep. The rebase must have messed it up. I have created a new PR with the specific changes only.

@roryabraham Ready for Review 👀

@afmire877 Sorry, that PR had a massive amount of unrelated changes. You should only have a few commits changing a reasonable number of files.

@afmire877 please submit an application via Upwork as well, that is where we issue payment. https://www.upwork.com/jobs/~018f2af1b48abf1846

📣 @afmire877 You have been assigned to this job by @arielgreen! Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻 Keep in mind: Code of Conduct | Contributing 📖

@afmire877 thanks for your proposal. Looks mostly good to me, with a few comments:

  • Let’s upgrade to the latest webpack 5.74.0
  • Let’s also upgrade to the latest webpack-dev-server: 4.9.3 (migration guide here)

If that sounds good to you, give this message a 👍 and I’ll assign it to you.

Proposal:

Upgrading to the latest version of webpack5 and its peer dependencies.

  "webpack": "^4.44.1",
  "webpack-bundle-analyzer": "^4.4.0",
  "webpack-cli": "^3.3.12",
  "webpack-merge": "^5.1.1"

to

    "webpack": "^5.73.0",
    "webpack-bundle-analyzer": "^4.5.0",
    "webpack-cli": "^4.10.0",
    "webpack-dev-server": "^3.11.3",
    "webpack-merge": "^5.8.0"

Breaking Changes

  1. https://github.com/Expensify/App/blob/a06358cef3ab1951fcbb5c256c003acdf238d447/config/webpack/webpack.common.js#L65 to
        new IgnorePlugin({
            resourceRegExp: /^\.\/locale$/,
            contextRegExp: /moment$/,
        }),
  1. Errors process not defined in Webpack 5, to fix this we install process and provide it as a plugin. Like below.
plugins: [
   // other plugins 
   
    new webpack.ProvidePlugin({
      process: "process/browser",
    }),
]

Also we should do this:

Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db