tailwindlabs/tailwindcss-jit

Extending backgroundImage. Getting "Can't resolve '___CSS_LOADER_URL_REPLACEMENT_2___' "

lanelps opened this issue · 0 comments

What version of @tailwindcss/jit are you using?

0.1.4

What version of Node.js are you using?

12.16.1

What browser are you using?

Firefox Developer Edition

What operating system are you using?

macOS Catalina 10.15.7

Reproduction repository

https://github.com/lanelps/tailwind-jit-bgimage/tree/test

In Gatsby I'm trying to extend backgroundImage with a custom background image in tailwind.config.js

extend: {
      backgroundImage: theme => ({
        'cane-pattern': "url('../assets/images/cane-pattern.png')"
      })
    }

But am getting this error

ERROR in ./src/styles/main.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/css-loader/dist/cjs.js):
Error: Can't resolve '___CSS_LOADER_URL_REPLACEMENT_2___' in '/Users/...'

Works just fine without JIT mode enabled/ normal Tailwindcss.