Skip to content

Conversation

@ChristopherBiscardi
Copy link
Contributor

This commit uses url-loader and img-loader to load images. They do
that because url() declarations in css files get translated into
require() calls.

for example, a call to

background-image: url('pages/0.jpg')

could get transformed to:

background-image:url(c5575182d7c7d7f98c8fc688bf840781.jpg)

Currently, the postcss, css-modules and file-loading works.


  • Use a solution for including the extracted styles.css. Ideally, that allows hashes for caches.
  • Split webpack processes are causing multiple images to be produced in a gatsby build. We should use webpack's multi-compiler mode to address this since that will mean we can refer to a single file rather than 1 file (which is the same file) per webpack process.

This commit uses url-loader and img-loader to load images. They do
that because `url()` declarations in css files get translated into
`require()` calls.

for example, a call to

```css
background-image: url('pages/0.jpg')
```

could get transformed to:

```css
background-image:url(c5575182d7c7d7f98c8fc688bf840781.jpg)
```
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

Successfully merging this pull request may close these issues.

1 participant