Skip to content

ng serve: Data path "" should NOT have additional properties(extractCss). #13009

@MindShelter

Description

@MindShelter

Versions

Angular CLI: 7.0.6
Node: 10.1.0
OS: win32 x64
Angular: 7.0.4
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, upgrade

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.10.6
@angular-devkit/build-angular     0.10.6
@angular-devkit/build-optimizer   0.10.6
@angular-devkit/build-webpack     0.10.6
@angular-devkit/core              7.0.6
@angular-devkit/schematics        7.0.6
@angular/cli                      7.0.6
@ngtools/webpack                  7.0.6
@schematics/angular               7.0.6
@schematics/update                0.10.6
rxjs                              6.3.3
typescript                        3.1.6
webpack                           4.19.1

Repro steps

  1. Add "extractCss":true option in angular.cli -> projects.projectName.architect.serve.options
    The same error occurs if add the command in
    projects.projectName.architect.serve.configurations.production
  2. Run ng serve

The log given by the failure

 Schema validation failed with the following errors:
 Data path "" should NOT have additional properties(extractCss). 

Desired functionality

Styles will be extracted and included into the project

Mention any other details that might be useful

I'm moving now to a hybrid angular/angularjs project and expect that my styles from components will be included in the project. Example of simple a component:

import template from './simple.html';
import controller from './simple.controller.js';
import './simple.less';

export const SimpleComponent = {
 template,
 controller
};

I will note that "extractCss":true option exists also in angular.cli -> projects.projectName.architect.build.configurations.production

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions