Upgrade to PostCSS v8 for custom-webpack v11 (and above) #1433
Labels
code task
dependencies
Pull requests that update a dependency file
e/0
Estimate in hours
high priority
Milestone
During the Angular 11 upgrade (see #1403), it was noted that we were unable to easily upgrade these dependencies
When attempting to upgrade to the v11 release of those webpack dependencies, it created a requirement to upgrade to PostCSS v8 (from v7). Here's the upgrade command that was attempted:
After running that update command, the
dspace-angular
codebase no longer builds when runningyarn start
:First, I found a reference to a similar error in angular/angular-cli#20967. That suggested reverting our
.browserlistrc
file to the default one provided by Angular 11. This seemed to solve a few of the PostCSS errors, but not all of them.So, I attempted to then upgrade to PostCSS v8 compatibility in all our PostCSS related dependencies:
(Note:
postcss-import@12
was used instead of@13
because with v13 I hit a different "PostCSS plugin postcss-import requires PostCSS 8" error, and the fix is to revert to v12: postcss/postcss-import#435 (comment))Upgrading everything to PostCSS v8 fixed some PostCSS errors in the previous build, but results in different odd build errors (again when running
yarn start
) like:In the end, I was unable to determine (in a reasonable amount of time) the source of the
AngularCompilerPlugin
error. Hopefully someone else will be able to determine how to complete a successful PostCSS v8 upgrade, based on these notes.The text was updated successfully, but these errors were encountered: