-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Closed
angular/angular-cli
#2069Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimetype: bug/fix
Description
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-clifrom 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-cliand 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 buildorng serve
Please tell us about your environment:
Tested on Windows 10 and Ubuntu 14.04 running NodeJS 6.5.0
- Angular version: 2.0.0-rc.6, angular/angular-cli@e20af21
- Language: TypeScript 2.0.2
- Node (for AoT issues):
node --version= 6.5.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimetype: bug/fix