Created
September 27, 2018 20:33
-
-
Save angel-vladov/83327fb21dd5c618cade5685d0f612bd to your computer and use it in GitHub Desktop.
Working Angular 6 SCSS Sourcemaps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/styles.js | |
+++ node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/styles.js | |
@@ -220,7 +220,7 @@ function getStylesConfig(wco) { | |
options: { | |
ident: 'embedded', | |
plugins: postcssPluginCreator, | |
- sourceMap: cssSourceMap | |
+ sourceMap: cssSourceMap ? 'inline' : false | |
} | |
}, | |
...use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const sh = require('shelljs'); | |
const PATCH_LOCK = 'node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/.patched-enable-sourcemaps'; | |
// You can generate patch file by `git diff` or use `diff -Nur` | |
if (!fs.existsSync(PATCH_LOCK)) { | |
sh.exec('patch -p0 -i tools/cli-patches/enable-sourcemaps.patch'); | |
sh.touch(PATCH_LOCK); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage instructions here
WARNING: