cssnano can't work with css module

Created on 14 Dec 2018  路  5Comments  路  Source: cssnano/cssnano

image
image
when I use the CSS module, my index.css file's background image URL can't be resolved, if I remove cssnano from my postcss.config.js, then everything works fine. So I believe cssnano has some conflict with CSS module.

Most helpful comment

@LastStranger please update css-loader to 2 version, 1 version very buggy

All 5 comments

@LastStranger what version css-loader your are use? Please provide minimum reproducible test repo

"css-loader": "^1.0.1","cssnano": "^4.1.7", "webpack": "^4.26.1", I believe all my devDependencies are the recent version. I don't know how to provide you minimum reproducible test repo. This is the error down below. If I remove cssnano, everything works as I expect. If I don't use CSS module and with cssnanno added, the background image in css file can be resolved well.

image

@LastStranger please update css-loader to 2 version, 1 version very buggy

OhOhOhOh, it solved. excellent, bro. Thank you so much, happy weekends

@LastStranger :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maxlapides picture maxlapides  路  7Comments

EduardoRT picture EduardoRT  路  5Comments

lukasoppermann picture lukasoppermann  路  7Comments

daviestar picture daviestar  路  7Comments

matanarbel-startapp picture matanarbel-startapp  路  6Comments