angular2-template-loader
angular2-template-loader copied to clipboard
Chain-to loader for webpack that inlines all html and style's in angular2 components.
I just updated Webpack and suddenly no template would load properly. By setting a breakpoint just after a component is loaded I could see that the template was loaded as...
Bumps [codecov](https://github.com/codecov/codecov-node) from 1.0.1 to 3.7.1. Release notes Sourced from codecov's releases. v3.6.4 Fix for Cirrus CI v3.6.3 AWS Codebuild fixes + package updates v3.6.2 command line args sanitised v3.6.1...
Fixes #66 This option is helpful when you need to use aliased path for template or style.
Hi, I've experienced that instead of proper file requiring, the file content passes into its URL :-( `GET http://localhost:8080/%3C!--The%20content%20below%20is%20only%20a%20placeholder%20and%20can%20be%20replaced.--%3E%0A%3Cdiv%20style=%22text-align:center%22%3E%0A%20%20%3Ch1%3E%0A%20%20%20%20Welcome%20to%20%7B%7B%20title%20%7D%7D!%0A%20%20%3C/h1%3E%0A%3C/div%3E%0A%3Ch2%3EHere%20are%20some%20links%20to%20help%20you%20start:%20%3C/h2%3E%0A%3Cul%3E%0A%20%20%3Cli%3E%0A%20%20%20%20%3Ch2%3E%3Ca%20target=%22_blank%22%20rel=%22noopener%22%20href=%22https:/angular.io/tutorial%22%3ETour%20of%20Heroes%3C/a%3E%3C/h2%3E%0A%20%20%3C/li%3E%0A%20%20%3Cli%3E%0A%20%20%20%20%3Ch2%3E%3Ca%20target=%22_blank%22%20rel=%22noopener%22%20href=%22https:/github.com/angular/angular-cli/wiki%22%3ECLI%20Documentation%3C/a%3E%3C/h2%3E%0A%20%20%3C/li%3E%0A%20%20%3Cli%3E%0A%20%20%20%20%3Ch2%3E%3Ca%20target=%22_blank%22%20rel=%22noopener%22%20href=%22https:/blog.angular.io/%22%3EAngular%20blog%3C/a%3E%3C/h2%3E%0A%20%20%3C/li%3E%0A%3C/ul%3E%0A%0A 404 (Not Found)` ``` ... { test: /\.ts$/, use: ['awesome-typescript-loader', 'angular2-template-loader?keepUrl=true',],...
``` [email protected] +-- [email protected] | `-- [email protected] ``` ``` (node:6856) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56 parseQuery() will be replaced with getOptions() in the...
0.6.1 version doesn't recognize some of my relative paths. This component ``` @Component({ selector: 'home', templateUrl: 'home.component.html' }) export class HomeComponent ... ``` builds to ``` HomeComponent = __decorate([ core_1.Component({...
``` js function replaceStringsWithRequires(string) { return string.replace(stringRegex, function (match, quote, url) { /* add webpack resolve root support if (url.charAt(0) === "/") { url = url.substring(1); }else */if (url.charAt(0) !==...
Just an example corrections.
Hi! I've created this PR because there are cases when user uses Webpack's aliases, and does not want to add prefixes to paths. like '@components/home.component' in Angular.
Closes #75 by using getOptions, which can resolve a query string or an options object on the loader in newer versions of webpack. Also provides a dummy LoaderContext for each...