brocessing / kirby-webpack

:muscle: A Kirby CMS starter-kit with modern frontend tools
MIT License
179 stars 23 forks source link

Font links are not working anymore #47

Open marco-land opened 5 years ago

marco-land commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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

ghost commented 5 years ago

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

grommas commented 5 years ago

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.