Closed marcioj closed 8 years ago
require('./styles')
should work, without extension
Also make sure you have css: {modules: true}
require('./styles') should work, without extension
This worked, thanks!
Maybe the css-brunch README should be updated to reflect this. Right now this is the current example:
var style = require('./title.css');
<h1 className={style.title}>Yo</h1>
Still, extensions kind of should be working... I'll look into it
Ok, created https://github.com/brunch/deppack/pull/12 to address that. Thanks for the report!
I was trying to use the css-brunch plugin but using
require('./styles.css')
shows the following errorUsing require with js files works fine.
Diving into the code I found out that this problem might be related with the following lines here
When computing the dependencies from
initialize.js
file, theallDeps
variable changes from['./styles.css']
to['styles.css']
. Afterward this array is passed tobrowser-resolve
which throws the error. I changed the code manually to preserve the['./styles.css']
behavior and everything worked fine. But it's not clear to me what this line is suppose to do. So I'm opening an issue here, since this looks like a bug.