CSS Sourcemap is always empty
See original GitHub issueMy 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 ?
Issue Analytics
- State:
- Created 7 years ago
- Comments:16 (12 by maintainers)
Top Results From Across the Web
webpack: understanding source maps when working with CSS
The problem with my current setup is that I would like to have proper source map support and that does not seem to...
Read more >4 Reasons Why Your Source Maps are Broken - Sentry Blog
4 Reasons Why Your Source Maps are Broken · Missing or incorrect source map directive · Missing original source files · Bad source...
Read more >PostCSS API
If you create a node manually (e.g., with postcss.decl() ), that node will not have a source property and will be absent from...
Read more >CSS source map support, network performance analysis & more
If I attempt to perform cross origin ajax request, I always do this by mistake usually a typo, Chrome print a clear error...
Read more >RequireJS Optimizer
Optimizes CSS by inlining CSS files referenced by @import and removing comments. ... You can always explicitly add modules that are not found...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, it works. I forget to put
--extract-css
Thanks @filipesilvaAre you sure it’s fixed? I still have the issue. My command is like this
"start": "ng serve --port 1800 --extract-css=true --sourcemap=true",
And source map still not show up
demo: https://github.com/craigcosmo/yeahman-angular-cli-app