Skip to content

CSS Sourcemap is always empty #4199

Closed
Closed
@changLiuUNSW

Description

@changLiuUNSW

My Angular-Cli version is 1.0.0-beta.26
Here is my angular-cli.json:

{
  "project": {
    "version": "1.0.0-beta.26",
    "name": "test"
  },
  "apps": [
    {
      "root": "src",
      "outDir": "dist",
      "assets": [
        "assets",
        "favicon.ico"
      ],
      "index": "index.html",
      "main": "main.ts",
      "test": "test.ts",
      "tsconfig": "tsconfig.json",
      "prefix": "app",
      "mobile": false,
      "styles": [
        "styles.scss"
      ],
      "scripts": [],
      "environments": {
        "source": "environments/environment.ts",
        "dev": "environments/environment.ts",
        "prod": "environments/environment.prod.ts"
      }
    }
  ],
  "e2e": {
    "protractor": {
      "config": "./protractor.conf.js"
    }
  },
  "test": {
    "karma": {
      "config": "./karma.conf.js"
    }
  },
  "defaults": {
    "styleExt": "scss",
    "prefixInterfaces": false,
    "inline": {
      "style": false,
      "template": false
    },
    "spec": {
      "class": false,
      "component": true,
      "directive": true,
      "module": false,
      "pipe": true,
      "service": true
    }
  }
}

And Here is my styles.scss

h1 {
    font-size: 20px;
}

When I type ng serve --extract-css=true or ng build --extract-css=true, the styles.bundle.map is always empty like:

{"version":3,"sources":[],"names":[],"mappings":"","file":"styles.bundle.css","sourceRoot":""}

Does anyone have the same issue with me ? Or maybe this is expected behavior ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgenttype: bug/fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions