-
Notifications
You must be signed in to change notification settings - Fork 30
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
Instructions on using @icon/font #7
Comments
Hey there, sorry I think I haven't clarified that clearly. |
Yup, already doing this. Also tried importing |
What is your project setup? The CSS loads eot and other font files. Does your stack support that? You can also try that manually using these files: https://github.com/march08/dashboard-ui-kit/tree/master/packages/Icon |
It's a fairly complex webpack setup that I couldn't communicate so easily
over GitHub here. Any chance I can reach you via email and send over the
repo so that you could take a look at it directly? I've spent a pretty
considerable amount of time trying to get this to work with no luck, and I
think I have all the loaders I need. Would be greatly appreciated!
…On Wed, Dec 4, 2019 at 2:47 PM Roman ***@***.***> wrote:
Yup, already doing this. Also tried importing import
***@***.***/icon/dist/styles.css'; with no luck.
What is your project setup? The CSS loads eot and other font files. Does
your stack support that? You can also try that manually using these files:
https://github.com/march08/dashboard-ui-kit/tree/master/packages/Icon
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7?email_source=notifications&email_token=AB37JWJ7AZKPNJWOFCOYP53QXAJMFA5CNFSM4JTOC7D2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF6N7LI#issuecomment-561831853>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB37JWJRWMOJ72I5YSU657TQXAJMFANCNFSM4JTOC7DQ>
.
|
Here are the various loaders -- this is probably the most relevant bit I can share. |
@dternyak can you mail me march08@outlook.com, i'll try to take a look Also, one solution might be hosting the font files and replacing the URL of the files. Of course you can also use other icons as well. I;ll try to reply soon once I get your mail. |
Thank you so much! I greatly appreciate this. I've just sent you an email. |
Hey guys, ran into the same issue... I has to do with :global scope on @duik/icon/styles.scss This is an issue with sass-loader - webpack-contrib/sass-loader#448 A quick and dirty way to fix it, is to replace line 86 (@duik/icon/styles.scss) From: To: If anybody knows a more permanent solution, please let me know. |
For me it did, make sure you clear your cache and rebuild. Try finding the css in the dom and change the :global to html and the icon should appear. Also, make sure the font file is loading, in my case it was. I settled with this webpack rule to find and replace ":global" to "html" for now: config.module.rules.push( {
test: path.resolve(__dirname, '../node_modules/@duik/icon/styles.scss'),
loader: 'string-replace-loader',
options: {
search: ':global',
replace: 'html',
}
}); |
Thank you so much for the help @tleite! Last bit I'm stuck on: I'm a bit unfamiliar with font-loading. Do you mind pointing me towards any resources on how to check if fonts are getting loaded? Unfortunately still not able to get this working. |
I think I've found another partial source of the problem: My font-family url paths are broken. This is what I see when inspecting the loaded icon stylesheet.
It's probably something related to my file loader, but I'm not sure what. Any tips would be appreciated!
|
@dternyak sorry I just got time to check the repo. It seems like the file loader in the repo doesn't process files under To resolve that quickly without fiddling with the webpack config, you can copy the contents from the packages/icon into the project. The font files and the CSS code where it defines the font-family with the imports. |
|
I've been unable to get
<Icon>
working in my project. I'm not running into webpack compile errors, and theuikon
style seems to be applying to the element, but I'm just seeing the plaintext "building" instead of the building icon render.Specific instructions on how to get
<Icon/>
working would be appreciated!The text was updated successfully, but these errors were encountered: