2
votes

I'm using the Aurelia-Cli to build an aurelia-app.

In the src folder I have app.js and app.html, now I'm adding an app.scss file.

I then require, as the documentation suggests in app.html:

<require from="./app.css"></require>

Unfortunately this throws an error saying h.load is not a function and unhandled rejection error: Failed loading required CSS file: app.css

I tried require "app.css", "app.scss", sadly, none of them work.

Can anyone point me in the right direction? I'm assuming this is a very simple problem

Thanks

2

2 Answers

2
votes

What does your folder structure look like?

When bundling with the cli you need to respect the original, unbundled structure in your require tags, i.e., if your app.scss is in src/stylesheets/app.scss your require will look as follows:"

<require from="./stylesheets/app.css"></require>

Note that I respect the path of the .scssbut actually require a .css file.

-2
votes

The error suggests that the app.css file does not exist. Make sure you are generating an app.css file from your app.scss file.