Trying to upgade to awesome-typescript-loader from ts-loader, however countering the problem where templates are not loaded. Not sure what to look into.
zone.js?fad3:355 Unhandled Promise rejection: Failed to load nav-menu.component.html ; Zone: <root> ; Task: Promise.then ; Value: Failed to load nav-menu.component.html undefined
Version:
"awesome-typescript-loader": "^2.2.4"
"webpack": "^2.1.0-beta.25"
I was facing the same problem. I just swapped the order of the loaders in the webpack.config.js
:
{
test: /\.ts$/,
loaders: ['angular2-template-loader', 'awesome-typescript-loader']
}
So 'angular2-template-loader'
comes before the 'awesome-typescript-loader'
. I have no idea why it worked.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.