Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to load image assets into webpack-dev-server? #24

Open
ilicmarko opened this issue Mar 22, 2020 · 0 comments
Open

How to load image assets into webpack-dev-server? #24

ilicmarko opened this issue Mar 22, 2020 · 0 comments

Comments

@ilicmarko
Copy link

Referencing this issue nystudio107/craft#27 here

Hi!
I nearly got this working. Even with a webpack-dev-server with https and certificate stuff, but then I walked into a problem with hot module reloading and "background-image: url(/img/header1.jpg)" in homepage.pcss.

I cannot get these ones to work:
url(/dist/img/header1.jpg)
url(/img/header1.jpg)
url(../img/header1.jpg)
url(../../img/header1.jpg)
url(/src/img/header1.jpg)

I peeked here to see if I could get an example of a local image in pcss, but they a pointed towards an cloudfront url:
https://github.com/nystudio107/devmode/blob/master/src/css/components/global.pcss

Do you have a solution for this to get it right?

Thanks,
Tim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant