Require vs import?



When should you use the html <require from="..."> vs the javascript import?
For example, css files seem to work from both.



I think if you want to extract CSS you need to import it from js. When you require from html Aurelia loader still looks for it in the bundle


Should also note that viewResources is the view model’s functional equivalent of <require from="...">

import { viewResources } from 'aurelia-framework';

export class SomeVM {}

javascript import is for pulling regular js modules/npm packages etc. while <require> and viewResources(...) are for pulling in html/css/aurelia-components