Closed kristjankoppel closed 5 years ago
Just when you start to lose all hope solution comes.
Correct way in SCSS is like that:
background: url('/assets/img/bg-door_handle.svg');
Path have to start with /
One enhancement idea for documentation - maybe you can write also if there is resolve aliases for Javascript and SASS that can be used for easier asset referencing.
A'la something like:
~
resolves to node_modules
or
~@images/
resolves to assets/img
But otherwise - great job Baumeister team & superb documentation.
Thanks for the feedback 😘
Hi!
I'm testing out Baumeister and everything is suiting exactly my needs. Only thing i can't figure out is how i reffer to images in my scss file?
I have code like that:
.image-emotional { background: url('../../img/bg-door_handle.svg') no-repeat right 50%; }
This css is located in: src/assets/scss/theme/site-header.scss and this file is imported in src/assets/scss/_theme.scssAnd i keep on getting error like: ` Failed to compile.
./src/assets/scss/index.scss Module build failed: ModuleNotFoundError: Module not found: Error: Can't resolve '../../img/bg-door_handle.svg' in '/Users/kristjankoppel/Propxls/clients/palun_segada/src/assets/scss' `
Didn't find anything from documentation and under issues. I've tried all kinds of different ways to get image: assets/img/bg-door_handle.svg etc