Aurelia-cli and modules that require css in their js


I’m trying to use the npm package parallax.js in my app. This module is requiring css directly from its source code :

I can’t manage to bundle it in my vendor bundle. Here is what I did in my aurelia.json :
"name": "parallax.js",
"path": "../node_modules/parallax.js",
"main": "main.js",
"resources": [

But I still get an error at building time like these :
Location: /dev/path/test/node_modules/parallax.js/styles.css.js Requested by: \dev\path\test\node_modules\parallax.js\main.js Is this a package? Make sure that it is configured in aurelia.json and that it is not a Node.js package

I found this issue : but can’t really do anything on the module sources, and really don’t want to fork it for that.
There must be a way to handle that with au-cli isn’t it?


Do you have the npm link for the parallax.js package? I cannot find it, and the one I found parallax-js doesn’t not have style.css in it’s module.

Also, what loader do you use? RequireJS, SystemJS?

Ben C.

Hi @benydc

the package npm link is :

I use require.js module loader.

But I think I’ve used a strange project, I probably meant to use this much more popular one:
and maybe there is no problem with this one, I will try with this one asap.

Still, it can be nice to know how to deal with package that require(’*.css’) in their sources.