angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

WEBPACK: Doesn't compile SASS-Files during building/serving

Open gfrSE opened this issue 10 years ago • 2 comments

  1. Windows 10

  2. angular-cli: 1.0.0-beta.11-webpack.2 node: 6.2.2 os: win32 x64

3.1) changed default.styleExt to 'scss' 3.2) keep 'app.component.css' in my component (SCSS should be compiled?!)

@Component({
  selector: 'app-root',
  templateUrl: 'app.component.html',
  styleUrls: ['app.component.css']
})
export class AppComponent {
  title = 'app works!';
}
  1. ERROR in ./src/app/app.component.ts Module not found: Error: Can't resolve './app.component.css' in 'D:\GFR\SVN\Project360\src\app'

Am I wrong to assume that these SCSS files should be compiled before/during serving the application? :)

gfrSE avatar Aug 16 '16 06:08 gfrSE

My mistake.. You have to use styleUrls: ['app.component.scss'] ! SASS will be compiled AND inlined into the index.html, there is no compiled css-file.

sorry!

gfrSE avatar Aug 16 '16 06:08 gfrSE

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.