Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 359934e

Browse filesBrowse files
author
Zhicheng Wang
committed
feat: add css-with-mapping-loader to enable source mapping for component style
feat: add html-loader and markup-inline-loader
1 parent 0f8689b commit 359934e
Copy full SHA for 359934e

File tree

Expand file treeCollapse file tree

3 files changed

+10
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+10
-2
lines changed
Open diff view settings
Collapse file

‎package.json‎

Copy file name to clipboardExpand all lines: package.json
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"chalk": "^1.1.3",
4949
"common-tags": "^1.3.1",
5050
"css-loader": "^0.26.1",
51+
"css-with-mapping-loader": "0.0.3",
5152
"cssnano": "^3.10.0",
5253
"debug": "^2.1.3",
5354
"denodeify": "^1.2.1",
@@ -62,6 +63,7 @@
6263
"fs-extra": "^0.30.0",
6364
"get-caller-file": "^1.0.0",
6465
"glob": "^7.0.3",
66+
"html-loader": "^0.4.4",
6567
"html-webpack-plugin": "^2.19.0",
6668
"inflection": "^1.7.0",
6769
"inquirer": "^0.12.0",
@@ -74,6 +76,7 @@
7476
"loader-utils": "^0.2.16",
7577
"lodash": "^4.11.1",
7678
"magic-string": "^0.16.0",
79+
"markup-inline-loader": "^0.1.3",
7780
"minimatch": "^3.0.3",
7881
"node-modules-path": "^1.0.0",
7982
"node-sass": "^4.3.0",
Collapse file

‎packages/@angular/cli/models/webpack-configs/common.ts‎

Copy file name to clipboardExpand all lines: packages/@angular/cli/models/webpack-configs/common.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) {
124124
rules: [
125125
{ enforce: 'pre', test: /\.js$/, loader: 'source-map-loader', exclude: [nodeModules] },
126126
{ test: /\.json$/, loader: 'json-loader' },
127-
{ test: /\.html$/, loader: 'raw-loader' },
127+
{ test: /\.html$/, loaders: ['html-loader', 'markup-inline-loader'] },
128128
{ test: /\.(eot|svg)$/, loader: `file-loader?name=[name]${hashFormat.file}.[ext]` },
129129
{
130130
test: /\.(jpg|png|gif|otf|ttf|woff|woff2)$/,
Collapse file

‎packages/@angular/cli/models/webpack-configs/styles.ts‎

Copy file name to clipboardExpand all lines: packages/@angular/cli/models/webpack-configs/styles.ts
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,12 @@ export function getStylesConfig(wco: WebpackConfigOptions) {
9090

9191
// load component css as raw strings
9292
let rules: any = baseRules.map(({test, loaders}) => ({
93-
exclude: globalStylePaths, test, loaders: ['raw-loader', ...commonLoaders, ...loaders]
93+
exclude: globalStylePaths, test, loaders: [
94+
'css-with-mapping-loader',
95+
`css-loader?${JSON.stringify({ sourceMap: cssSourceMap })}`,
96+
...commonLoaders,
97+
...loaders
98+
]
9499
}));
95100

96101
// load global css as css files

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.