Closed trusktr closed 9 years ago
My guess is that for some reason cssify isn't being applied, and the file is being read like a JavaScript file?
It's not ES6 (6to5ify) getting in the way, I tried the following and still get the same error:
require('famous/core/famous.css')
require('highlight.js/styles/solarized_light.css')
I'm only using cssify now, getting the same error.
//.transform(to5ify)
//.transform(famousify)
.transform(cssify)
I pasted the content from famous.css into solarized_light.css, but the error is the same, right at the first period in front of the first class name. This makes me wonder if cssify is not recognizing the file as a CSS file or something?
Apparently it's not cssify's fault at all. Browserify seems to support css files now, as I've completely removed cssify, and I'm still able to import famous.css just fine, and solarized_light.css continues to throw the same error.
Nevermind, I was confused, there was another cssify somewhere in node_modules that was still working so it's not browserify. I removed node_modules and started over. Now I have cssify only in the top-level node_modules and am getting this problem.
Question: Does cssify ignore styles if they are required from a module dependency? For example, maybe having cssify inside of the highlight.js
module would work, only?
Yep! I think that's it. 'highlight.js/styles/solarized_light.css'
is in a sub module, so it won't work in my module/application. I believe I must use a global transform. That's unintuitive on behalf of browserify.
Thanks for all the work on this! I'll look into what the best way to do this is.
I've a file that imports css like this:
The
famous.css
file gets loaded just fine, but the second css file fails on the first character (a.
).solarized_light.css begins like this:
I've got the following transforms:
and I'm getting this error:
Any idea what might be happening?