glromeo / esbuild-sass-plugin

esbuild plugin for sass
MIT License
155 stars 40 forks source link

'Could not resolve' error when importing a font file using a relative path in scss #159

Closed josephdyer closed 10 months ago

josephdyer commented 10 months ago

Hey, apologies if I'm asking in the wrong place, I'm a bit puzzled - just wondering if you could help? :)

I'm using VSCode's path autocomplete within an @font-face rule and the path should be: url('../../../../assets/fonts/bricolage-grotesque-400.woff2') format('woff2') but I keep getting that error. I've tried other paths too but no luck :(

Am I missing an esbuild config setting or?

Thank you for your time, appreciate if any advice can be given :)

Screenshot 2024-01-04 at 15 37 25

josephdyer commented 10 months ago

I added external: '*.woff2' in my config and it seems to have fixed it! :)