Skip to content

How to set the image path from SCSS files #1217

Closed as not planned
Closed as not planned
@webmasterpf

Description

@webmasterpf

Hello,
I have an issue about my images path into my CSS. So after looking at webpack encore setting, I modifiy the location folder as it become this (tailwind syntax):
@apply bg-[url(assets/images/SVG/flag-france.svg)]; with this location /assets/images , in replacement of @apply bg-[url(../../images/SVG/flag-france.svg)]; linked to with images/ . Now I can see previsualisation images in vscode. But when I compile I get an error like this: ./css/src/tailwind.scss" contains a reference to the file "assets/images/SVG/flag-france.svg".
This syntax seem to work as equal in vscode: bg-[url(../../../../assets/images/SVG/flag-france.svg)]; But lead to the same error message :
This file can not be found, please check it for typos or update it if the file got moved.
So I don't understand why, do I need to change something in the webpack encore config ( as I used the basic config) .
https://gitlab.com/themes-d9/starter-d9-2022/-/blob/d5ec178af9a9299a5ea5395d1af8954257f27f18/webpack.config.js
What are your thoughts about this ? Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions