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

Disable webpack css url rewriting #8518

Merged
merged 1 commit into from May 11, 2022

Conversation

jacobtoppm
Copy link
Member

@jacobtoppm jacobtoppm commented May 11, 2022

This was causing relative urls to be rewritten to use the publicPath in the webpack config, /static/.
This meant that the icon font would be referenced at the wrong location if sites had changed STATIC_URL

Fixes #8517

@squash-labs
Copy link

squash-labs bot commented May 11, 2022

Manage this branch in Squash

Test this branch here: https://jacobtoppmfixdisable-webpack-c-48z49.squash.io

Copy link
Member

@lb- lb- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great, did a bit of research and this make sense.

https://webpack.js.org/loaders/css-loader/#url

Before

Screen Shot 2022-05-11 at 7 22 26 pm

After

Screen Shot 2022-05-11 at 7 23 40 pm

This was causing relative urls to be rewritten to use the publicPath.
This meant that the icon font would be referenced at the wrong location
if sites had changed STATIC_URL
fixes wagtail#8517
@lb- lb- force-pushed the fix/disable-webpack-css-url-rewriting branch from 17b657f to 0664e0d Compare May 11, 2022 09:27
@lb- lb- merged commit 7e98db7 into wagtail:main May 11, 2022
lb- pushed a commit that referenced this pull request May 11, 2022
This was causing relative urls to be rewritten to use the publicPath.
This meant that the icon font would be referenced at the wrong location
if sites had changed STATIC_URL
fixes #8517
@lb-
Copy link
Member

lb- commented May 11, 2022

Cherry picked into 3.0 9b659cb

@jacobtoppm
Copy link
Member Author

Thanks @lb- !

@jacobtoppm jacobtoppm deleted the fix/disable-webpack-css-url-rewriting branch May 11, 2022 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Icon-font icons fail to display when STATIC_URL is not "/static/"
2 participants