Assign a url to css assets #18403
Unanswered
yishay-at-bay
asked this question in
Q&A
Replies: 1 comment
-
Answered in |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to have the output html file in production with a link tag for the css asset that looks something like that
<link href="https://some-cdn-url/main.026ea848882c3b721917.css" rel="stylesheet">
where the
main.026ea848882c3b721917.css
is the regular hashed asset name andhttps://some-cdn-url
is some address that holds the css (I will take care to the part that puts the asset there)I'm using MiniCssExtractPlugin in production so I tried using the filename option to do that
But with the filename option no matter what value I'm giving it, the output in the html file will always start with a slash. It also translates some of the chars.
So if I put
I get
<link href="/https%3A//some-cdn-url/main.026ea848882c3b721917.css" rel="stylesheet">
With
/
at the beginning and the:
turns into%3A
Is there a way, with some plugin or some other tool, that I can create the output correctly so the browser will know to request the css asset from the right address?
Beta Was this translation helpful? Give feedback.
All reactions