fix(compiler): generated CSS files suffixed with ngstyle. (#13353)

Mirrors factories which ends in `ngfactory`.

Closes #13141.
This commit is contained in:
Hans
2016-12-13 17:34:46 -08:00
committed by Victor Berchet
parent f5f1d5f65c
commit d62d89319e
7 changed files with 21 additions and 12 deletions

View File

@ -272,7 +272,7 @@ function _componentFactoryName(comp: CompileIdentifierMetadata): string {
}
function _stylesModuleUrl(stylesheetUrl: string, shim: boolean, suffix: string): string {
return shim ? `${stylesheetUrl}.shim${suffix}` : `${stylesheetUrl}${suffix}`;
return `${stylesheetUrl}${shim ? '.shim' : ''}.ngstyle${suffix}`;
}
function _assertComponent(meta: CompileDirectiveMetadata) {

View File

@ -341,7 +341,7 @@ export class JitCompiler implements Compiler {
if (!this._compilerConfig.useJit) {
return interpretStatements(result.statements, result.stylesVar);
} else {
return jitStatements(`/${result.meta.moduleUrl}.css.js`, result.statements, result.stylesVar);
return jitStatements(`/${result.meta.moduleUrl}.ngstyle.js`, result.statements, result.stylesVar);
}
}
}