kirby-webpack icon indicating copy to clipboard operation
kirby-webpack copied to clipboard

Font links are not working anymore

Open marco-land opened this issue 6 years ago • 6 comments

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

marco-land avatar Oct 18 '18 20:10 marco-land

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 avatar Oct 20 '18 16:10 pqml

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

pqml avatar Oct 20 '18 17:10 pqml

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

marco-land avatar Oct 22 '18 19:10 marco-land

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

joeyaurel avatar Jan 21 '19 19:01 joeyaurel

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

ghost avatar Feb 17 '19 16:02 ghost

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.

grommas avatar May 01 '19 10:05 grommas