fuse-box / fuse-box/angular2-example

Unable to use Components' `templateUrl` property

オープン
#23 コメント 5 件 リアクション 1 件 担当者 0 名 GitHub で見る
enhancement
主要言語
HTML
スター
43
フォーク
13
PR マージ指標
30日以内にマージされた PR はありません

説明

Hi Guys,

I've just tried fuse-box and it's just unbelievably fast! Nothing compared with the tons configuration I've write to run webpack or systemjs in a simple "hello world" project. And this project also helped me a lot to start working with fuse-box.

I was wondering if there's a way (or a plugin) to use Angular2 Components' `templateUrl` property instead of just requiring the template and push it in the code. Basically I would like to avoid calling the `require` function and just write the url of my template. This is more annoying when you have an array of css to include (using RawPlugin for css files).

Current usage
Preferred usage

@Component({

selector: 'app',
template: require('./app.component.html')
styles: [ require('./app.component.css') ]
}

@Component({

selector: 'app',
templateUrl: './app.component.html'
styleUrls: [ './app.component.css' ]
}

Anyway, the result should be the same for both usage, so the template content will be pushed in the bundle itself. But, since this feature is already available in webpack/systemjs, do you mind it will be also for fuse-box? Maybe "overriding" (decorating), if possibile, the decorator implementation?

Thank you :)

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。