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

Font links are not working anymore #47

Open
marco-land opened this issue Oct 18, 2018 · 6 comments
Open

Font links are not working anymore #47

marco-land opened this issue Oct 18, 2018 · 6 comments

Comments

@marco-land
Copy link

marco-land commented Oct 18, 2018

Hi, my assets folder setup is like this:

assets
├── builds/
│   ├── bundle.css
│   ├── bundle.js
│   └── ...
└── fonts/
    └── fontfiles ...

in my css I am linking to url('../fonts/fontfiles')

after running npm run start i get the error Module not found: Error: Can't resolve ...
but if i run npm run build the font is loaded correctly. but on the dev server it won't work.

it is exactly setup like a previous project and it works fine there

@pqml
Copy link
Member

pqml commented Oct 20, 2018

Could you provide me more informations please ?

Are you trying to include a css file using @import, or a font via @font-face and src ?

@pqml
Copy link
Member

pqml commented Oct 20, 2018

If possible, can you please attach to this issue a .zip of a project reproducing your issue - without including panel / kirby kirby folders, nor the node_modules folder

@marco-land
Copy link
Author

marco-land commented Oct 22, 2018

Hi pqml,

thanks for checking up on this.

Attached you can find the .zip of an example. It's not only fonts but all links would not work. I've switched to an older version of the kirby-webpack repo and the setup works there.

The css line is inside ./src/styles/_typography.scss and actual font file is in ./www/assets/fonts

Thanks!
kirby-webpack-example.zip

@joeyaurel
Copy link

joeyaurel commented Jan 21, 2019

Whats the status here? Getting the same issues (no relative links work). @img2001jpg On what version did you fall back?

@ghost
Copy link

ghost commented Feb 17, 2019

I have the same Problem. Would be great to get an answer ...

@grommas
Copy link

grommas commented May 1, 2019

If you have a relative path inside your scss, you can get it work by having the font files twice. One folder relative to your compiled css and one folder relative to your uncompiled scss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants