I'm submitting a ... (check one with "x")
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
Note: I'm not sure if this issue is an issue of @angular/compiler-cli or angular-cli
After compiling a style-embedded component, the compiler generates a .css.shim.ts file. But this file causes the following error while building:
ERROR in [default] C:\path\to\project\src\app\app.component.css.shim.ts:1:7
Property 'exports' does not exist on type '{ id: string; }'.
ERROR in [default] C:\path\to\project\src\app\app.component.ngfactory.ts:17:26
File 'C:/path/to/project/src/app/app.component.css.shim.ts' is not a module.
This is the content of app.component.css.shim.ts:
/**
* This file is generated by the Angular 2 template compiler.
* Do not edit.
*/
/* tslint:disable */
export const styles:any[] = [''];
Expected behavior
.css.shim.ts files should not cause errors during build.
Reproduction of the problem
- Use
angular-cli from the master branch - as the time of writing, I use angular/angular-cli@e20af21 (The latest release still on RC5)
- Generate a new project using
ng new
- Install
@angular/compiler-cli and its dependency, @angular/platform-server
- Compile the component using
./node_modules/.bin/ngc -p ./src
- Edit main.ts to look like this: https://gist.github.com/sarunint/d19269000028d504685f38f206410dc0
- Build using
ng build or ng serve
Please tell us about your environment:
Tested on Windows 10 and Ubuntu 14.04 running NodeJS 6.5.0
I'm submitting a ... (check one with "x")
Current behavior
Note: I'm not sure if this issue is an issue of
@angular/compiler-cliorangular-cliAfter compiling a style-embedded component, the compiler generates a
.css.shim.tsfile. But this file causes the following error while building:This is the content of
app.component.css.shim.ts:Expected behavior
.css.shim.tsfiles should not cause errors during build.Reproduction of the problem
angular-clifrom the master branch - as the time of writing, I use angular/angular-cli@e20af21 (The latest release still on RC5)ng new@angular/compiler-cliand its dependency,@angular/platform-server./node_modules/.bin/ngc -p ./srcng buildorng servePlease tell us about your environment:
Tested on Windows 10 and Ubuntu 14.04 running NodeJS 6.5.0
node --version= 6.5.0