You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 28, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 28, 2026. It is now read-only.
When I use webpack -p, I'm getting a non helping error message
ERROR in ./~/css-loader!./~/cssnext-loader!./src/index.css
Module build failed: Error: Please check the validity of the CSS block starting from the line #1
at throwError (/.../node_modules/css-loader/node_modules/csso/lib/gonzales.cssp.node.js:399:15)
at checkStylesheet (/.../node_modules/css-loader/node_modules/csso/lib/gonzales.cssp.node.js:1921:22)
at Object.CSSPRules.stylesheet (/.../node_modules/css-loader/node_modules/csso/lib/gonzales.cssp.node.js:365:40)
at _getAST (/.../node_modules/css-loader/node_modules/csso/lib/gonzales.cssp.node.js:409:38)
at exports.srcToCSSP (/.../node_modules/css-loader/node_modules/csso/lib/gonzales.cssp.node.js:2287:16)
at Object.exports.srcToCSSP (/.../node_modules/css-loader/node_modules/csso/lib/gonzales.cssp.node.js:2292:16)
at Object.exports.parse (/.../node_modules/css-loader/node_modules/csso/lib/cssoapi.js:7:21)
at Object.module.exports (/.../node_modules/css-loader/index.js:18:18)
@ ./src/index.css 4:14-293
In this index.css I just have some inlined @import, so this error is not really helping.
Is there any way to improve that?
My first import is normalize.css and after taking a look in the <style> element I saw some empty :root elements (due to the fact I use future proof CSS transformed via cssnext).
It seems the parser you are using is kind of outdated for some part.
If you are using csso for minification, would you consider switch to a more fresh tool (csswring) based on an parser with an active development (postcss)?
Yes, write a PR... I've already tried to use an alternative library in the rework branch.
Check that all test pass and maybe add some for the new stuff.
The rework branch doesn't work out, because it removed the whitespace from css and this would break SourceMap.
rework is kind of unmaintained (last commit is from august 2014).
More & more people are switching to postcss now that the ecosystem start to be consistent.
Since a rewrite with PostCSS is probably rather expensive, we should add a quickfix for the status quo because the current problem renders the css-loader useless.
A rewrite with postcss should be pretty quick since postcss-import can do the inline & postcss-url can do accept a callback to handle what to do with the url.
A "quickfix" should be to fix the parser, which seems heavier to me than using postcss-import + url plugins...
Activity
jhnns commentedon Jan 23, 2015
PostCSS is backed by Autoprefixer, so it's probably developed more actively. 👍
MoOx commentedon Jan 23, 2015
postcss 4 is really fast (just run this to check it out https://github.com/postcss/postcss/tree/master/benchmark ) & even support CSS specs that are not implemented in browsers. So seems a really good choice indeed.
sokra commentedon Jan 23, 2015
Yes, write a PR... I've already tried to use an alternative library in the
reworkbranch.Check that all test pass and maybe add some for the new stuff.
The
reworkbranch doesn't work out, because it removed the whitespace from css and this would break SourceMap.MoOx commentedon Jan 23, 2015
rework is kind of unmaintained (last commit is from august 2014).
More & more people are switching to postcss now that the ecosystem start to be consistent.
sokra commentedon Jan 26, 2015
yeah... I'm fine if you do a PR with postcss.
jhnns commentedon Feb 3, 2015
Since a rewrite with PostCSS is probably rather expensive, we should add a quickfix for the status quo because the current problem renders the css-loader useless.
MoOx commentedon Feb 3, 2015
A rewrite with postcss should be pretty quick since postcss-import can do the inline & postcss-url can do accept a callback to handle what to do with the url.
A "quickfix" should be to fix the parser, which seems heavier to me than using postcss-import + url plugins...
MoOx commentedon Feb 3, 2015
Oh just saw you fix. Ouch.
MoOx commentedon Jun 18, 2015
Closing since you now use postcss