Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative image urls in @wordpress/scripts 18.0.0 #34376

Closed
2 tasks done
kimmenbert opened this issue Aug 30, 2021 · 0 comments · Fixed by #34394
Closed
2 tasks done

Relative image urls in @wordpress/scripts 18.0.0 #34376

kimmenbert opened this issue Aug 30, 2021 · 0 comments · Fixed by #34394
Assignees
Labels
[Status] In Progress Tracking issues with work in progress [Tool] WP Scripts /packages/scripts [Type] Bug An existing feature does not function as intended

Comments

@kimmenbert
Copy link

Description

Hey, In @wordpress/scripts 18.0.0 I understand that there is breaking changes.

I’m using this for compiling both js and scss. And I now get TypeError: url.replace is not a function when trying to compile a scss file that contains relative paths to image files, like background-image: url('../images/image.svg');

Thought it was because of me having a bit of a custom webpack config. But also failed with a fresly made @wordpress/create-block

Step-by-step reproduction instructions

  1. npx @wordpress/create-block todo-list
  2. Add an svg to /todo-list/images
  3. Add background-image: url(../images/yourimage.svg); to style.scss
  4. npm run build

Screenshots, screen recording, code snippet

No response

Environment info

No response

Pre-checks

  • I have searched the existing issues.
  • I have tested with all plugins deactivated except Gutenberg.
@gziolo gziolo added the [Type] Bug An existing feature does not function as intended label Aug 30, 2021
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] In Progress Tracking issues with work in progress [Tool] WP Scripts /packages/scripts [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants