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.
ERROR in ./~/css-loader?root=..!./css/front.css
Module build failed: Error: Please check the validity of the CSS block starting from the line #414
at throwError (/node_modules/css-loader/node_modules/csso/lib/gonzales.cssp.node.js:399:15)
at getBlock (/node_modules/css-loader/node_modules/csso/lib/gonzales.cssp.node.js:755:18)
since JS doesn't have recursion in their regexps. You'll have to find the index = 1 match group from them, since I don't think JS supports named regex either. The first case disallows urls with ) and ( because you need a way to know the 'end' if your uri string. Possibly we could allow escaping ) but I can't find that in the spec.
This works with my sample file.
Can you throw such a loader together now, please, so I can publish my site? I would really owe you one.
Do you all have thoughts on using this css parser? It only breaks out the code to an AST which you could then query for url from ast trees that are of type import.
For me this has meant I can't use webpack right now. I did some looking into how to write a regex parser, but there's just so much undocumented structure that I don't recognise, so I gave up. I haven't had any other contact with anyone from webpack.
Ok, I had problems with that loader as well; other problems, like race-conditions breaking 25 minute builds (latest problem) and problems finding a stable version in general, unfortunately. If you look inside that repo for issues started by me, you'll see how interested they are in helping out.
Activity
sokra commentedon Apr 2, 2015
yeah. We propably need to implement our own parser, which just grabs
url(...)and@import ....haf commentedon Apr 2, 2015
Ok...? That would need to allow all chars in RFC3986, and the CSS2 spec 4.3.4 and import like these. So that's implemented by these regexes:
Test-data:
since JS doesn't have recursion in their regexps. You'll have to find the index = 1 match group from them, since I don't think JS supports named regex either. The first case disallows urls with
)and(because you need a way to know the 'end' if your uri string. Possibly we could allow escaping)but I can't find that in the spec.This works with my sample file.
Can you throw such a loader together now, please, so I can publish my site? I would really owe you one.
mtscout6 commentedon Apr 2, 2015
Do you all have thoughts on using this css parser? It only breaks out the code to an AST which you could then query for url from ast trees that are of type import.
haf commentedon Apr 3, 2015
Seems like that parser has a bug in the parsing of URLs with
), that I mentioned in my regex: reworkcss/css#67 (comment)sokra commentedon Apr 3, 2015
I would like to make it simpler and just allow everything except the end mark:
/url\s*\(\s*"([^"]*)\s*\)/etc.We also need to check for comments and ignore them.
Here is a simple module which combines statemachine with regex for parsing. i. e. the html-loader uses it to parse the html: https://github.com/webpack/fastparse
cc @jhnns
mgmorcos commentedon Apr 6, 2015
👍
chrisguerrero commentedon Apr 7, 2015
Any word on this?
haf commentedon Apr 7, 2015
For me this has meant I can't use webpack right now. I did some looking into how to write a regex parser, but there's just so much undocumented structure that I don't recognise, so I gave up. I haven't had any other contact with anyone from webpack.
chrisguerrero commentedon Apr 7, 2015
@haf I just got around this by switching the filename to .scss and using the sass-loader
haf commentedon Apr 7, 2015
Ok, I had problems with that loader as well; other problems, like race-conditions breaking 25 minute builds (latest problem) and problems finding a stable version in general, unfortunately. If you look inside that repo for issues started by me, you'll see how interested they are in helping out.
jhnns commentedon Apr 28, 2015
Thx @sokra. I'm totally busy right now (because I'm relocating) and haven't found the time to investigate this 😞
Merge pull request webpack#43 from mako-taco/master