-
-
Notifications
You must be signed in to change notification settings - Fork 158
esModules: true
outputs url([object Module])
instead of url(base64String)
for inline local fonts?
#201
Comments
Update css-loader to latest version |
@evilebottnawi Please reopen and fix :-) |
No, it is not broken and tested, please update deps |
Here line https://github.com/webpack-contrib/css-loader/blob/master/src/runtime/getUrl.js#L8 for handling |
@thomas-darling I had to set {
test: /\.(eot|woff|woff2|ttf|svg|png|jpg|gif)$/,
use: {
loader: 'url-loader',
options: {
limit: 100000,
name: '[name].[ext]',
// Introduced in v3, removes inline font files if enabled 🤷♂️
esModule: false,
},
},
} But, I'm not sure if this is the right way. |
I do not recommend disable that, because it is increase bundle size and tree shaking doesn't work |
Double check your version, refresh lock file |
Do not forget about you need update |
@evilebottnawi This bug is most definitely still alive 🐛 |
There you are linking to that |
@thomas-darling Where is bug? Please provide reproducible test repo |
I don’t know where the bug is, but it is most definitely there, as already described above. And sorry, I won’t waste time setting up a test repo to prove this - it’s an obvious regression. |
It sounds insulting, I spend my time to help you, but you don’t want to help me and claim a problem without even showing it. Obvious? No, it is not obvious because I can’t find out where it happens. What loaders you have? What plugins you have? What code you have? Maybe mistake in your code? Or maybe mistake in other dependencies. I don't known. |
(deleted as this comment was based on a misunderstanding) |
@thomas-darling Seriously? I asked you to provide more information:
And before that I gave recommendations on how to fix the problem and potentially problem places. Where my tone was irritable or rude to you? It is you are rude to me right now. I am providing assistance to hundreds of people and just asking to help me with this by providing more information instead the charges. I closed the issue because I added tests and the values were expected. What have you done? #201 (comment) - you came and demanded to fix the problem without providing any information, I'm sorry I do not own telekinesis and can not find out your configuration and the code on another part of the planet. Don't you think is a little unprofessional? Now you are directly violating developers Code of Conduct, but I continue to talk with you because I want to find a problem and fix it. I ask you to stop being emotional, since we are not in a kindergarten, I will help you find the problem and fix it if it is in our code. It will not take you more than 5-10 minutes to make an example; writing messages about what are all bad takes longer. |
Ok, I actually do owe you an apology here. Your comments about I won't have time to debug this further right now, but I'll get back to you if/when we know more. |
@thomas-darling Thank you, I hope for understanding, just ping me when you have an example or more information |
/cc @ganapativs Original problem still exists? If yes can you provide configuration or example? |
Do you use |
@evilebottnawi Here is a repro for the issue. https://codesandbox.io/s/winter-fire-qwym7 This repro uses Currently, Now set In this case, the CSS file has
Am I missing something here or is it a bug? |
@ganapativs Please open issue in |
I did check the Apparently, they have decided not to upgrade the Thanks for your time 👍 |
Expected Behavior
Should convert inline local fonts to
base64
and output the bundle.Eg:
Actual Behavior
Generates buggy output code(Note
url([object Module])
here)!src: local('Poppins Regular'), local('Poppins-Regular'), url([object Module]) format('woff2');
Setting
esModule: false
works as expected for now. But, is this the expected behaviour?Code
How Do We Reproduce?
Repro #201 (comment)
Load any font face with local fonts and bundle it with
url-loader
.eg:
The text was updated successfully, but these errors were encountered: