Closed arabsight closed 7 years ago
@arabsight
thx :-)
1: The testTemplate loader is part of the loader, did you open the wrong one ? https://github.com/vegarringdal/fuse-box-aurelia-loader/blob/new_loader/src/fuse-box-aurelia-loader.ts#L15-L26
2: I need to check that one out more, copy paste from webpack one, or default, have some cleaning to do, thx
3: Unsure about this one, I have defined a package here on my datagrid Ive Im working one. It loads fine, but maybe Im missing something, much I dont know yet.
Here is the build process for the seperate package, after a few fixed by @nchanged its working like expected with main, and not executing on load.
But but not being able to put this as part of a bundle and being force to use own bundle file is the ready why I created the issue with packages:[]
or addPackage()
here
Grid: aurelia-v-grid-plugin bundle/build
4: Yes I need to do something much better here, its not good, temp fix to just get it loading for the moment, maybe you had something in you loader ?
Other: Created this: https://github.com/fuse-box/fuse-box/issues/321
Because last updates using just raw plugin with break .ts import 'whatever.css
:-)
I totally opened the wrong file, my bad. regarding css: what is the expected behavior from this: import 'whatever.css' (do you expect it to inject using fusebox)?
I totally opened the wrong file, my bad.
Been there, done that :joy:
regarding css: what is the expected behavior from this: import 'whatever.css' (do you expect it to inject using fusebox)?
Well atm we need to use raw plugin for the <require from ="whatever.css"></require>
to work.
But when you do import import 'whatever.css'
we need it to work like the cssPlugin does it, and inject it.
But when we use the cssplugin we break how aurelia work with require
tag in html
Not sure how we can solve that, if you have any suggestions then great :-)
https://github.com/fuse-box/fuse-box/issues/321
is that necessary? I don't think aurelia-cli nor systemjs skeleton loaders does that, do they? what if someone wants to do something with the css like:
import * as styles from 'somestylesheet.css';
doSomething(styles);
we don't expect it to inject here. IMO css best imported with require.
I though that everyone did that
I believe I did it the similar way when using jspm.. (dont rememeber) Maybe the css plugin should work like this
import 'css!yourstyle.css';
if you want it to inject the code..
@nchanged any comments?
@vegarringdal yeah, we had it at some point. But removed it. (It leads to a mess) Could you comment on that one there:
Personally, I have prefered <require from="my.css">
but this conversation made me think. Maybe it's easier to import 'my.css'
, especially for custom attributes or elementts without a view..
@Thanood isn't @viewResources the same as require for VMs, especially because you can use an object with as if you want to use scoped css.
@arabsight I was just referring to @vegarringdal's comment about using import
.. 😃
But anyway, I think yes, it is the same. How does the loader handle it? I guess like require
, right?
@Thanood we're discussing ideas :smiley: the more the better of course :wink: . the loader just loads modules, aurelia-templating and aurelia-templating-resources deals with the resources, so these two are the same:
@viewResources({ src: './app.css', as: 'scoped' })
<require from="./app.css" as="scoped"></require>
but we can't do this with import.
Hi, @vegarringdal I tried the (css) update with your test repo and its working :+1: got some notes:
thanks for your hard work.