patternfly-org
patternfly-org copied to clipboard
React 18/webpack 5 follow up
Notes about the dependency upgrades and things to potentially follow up on from https://github.com/patternfly/patternfly-org/pull/3454.
- [ ] Replace
@reach/router
(and current workaround@gatsbyjs/reach-router
) with React's router. Reach has a built in older version of React that isn't playing nice with 18. - [ ] Remove
file-loader
dependency (isn't used anymore) - [ ] Investigate
path-browserify
andprocess
usage to see if they are necessary (there should be a better way of getting path and process environment variables). Used inscripts/webpack/webpack.base.config
. - [ ] Convert
cli
scripts to typescript for better intellisense/error logging - [ ] In
scripts/cli/start.js
, investigate new syntax for enabling error logging - [ ] In
scripts/webpack/webpack.client.config
, investigate what the replacement for the deprecatedstats
prop is, and look upcompress
and why the recommended default istrue
. - [ ] In
scripts/webpack/webpack.server.config
, investigate null loader usage that was removed for nonvc (we may need an alternative, but the build is currently working without it) - [ ] Revisit Monaco usage (React issue is already open?)
- [ ] Double check
asset/resource
usage (this replaced the variousloader
modules) but it looks to be working atm - [ ] Validate CSS loading (that we aren't loading it multiple times)
- [ ] Investigate webpack's included
Terser
plugin and its usage - [ ] Investigate caching and cleaning for the build process - you shouldn't need a
yarn clean
between builds but the clean isn't properly emptying all the caches - [ ] Investigate removing node SSL legacy option from the start script