Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !12741

Update resolve-url-loader@^5.0.0 (with PostCSS v8) to avoid conflicts

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Administrator requested to merge github/fork/pushred/resolve-url-loader-v5 into main Sep 20, 2022
  • Overview 4
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: pushred

This upgrades to the latest version of resolve-url-loader which itself upgrades to PostCSS@8. I have been encountering version conflicts related to this dependency and others that also depend on PostCSS that block CRA Webpack builds with this error:

> react-scripts build

Creating an optimized production build...
Failed to compile.

static/css/main.a6b5f62b.css from Css Minimizer plugin
Error: PostCSS plugin postcss-discard-comments requires PostCSS 8.
Migration guide for end-users:
https://github.com/postcss/postcss/wiki/PostCSS-8-for-end-users

The only usage of resolve-url-loader in react-scripts is requiring it in the Webpack config, so this upgrade is straightforward and in my testing causes no issue with the dev server or building for production.

I reported more details about the conflict here, including a reproduction:

https://github.com/storybookjs/storybook/issues/19218

Currently I am working around this with npm v8's overrides feature.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/pushred/resolve-url-loader-v5