Skip to content

Commit e9e038d

Browse files
authored
docs: 'prependData' option renamed to 'additionalData' in sass-loader 9 (#1714) [skip ci]
1 parent d5f7e16 commit e9e038d

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

Diff for: docs/guide/pre-processors.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Note that `sass-loader` processes the non-indent-based `scss` syntax by default.
7575

7676
### Sharing Global Variables
7777

78-
`sass-loader` also supports a `prependData` option which allows you to share common variables among all processed files without having to explicit import them:
78+
`sass-loader` also supports a `additionalData` option which allows you to share common variables among all processed files without having to explicit import them:
7979

8080
``` js
8181
// webpack.config.js -> module.rules
@@ -88,8 +88,9 @@ Note that `sass-loader` processes the non-indent-based `scss` syntax by default.
8888
loader: 'sass-loader',
8989
options: {
9090
// you can also read from a file, e.g. `variables.scss`
91-
// use `data` here if sass-loader version < 8
92-
prependData: `$color: red;`
91+
// use `prependData` here if sass-loader version = 8, or
92+
// `data` if sass-loader version < 8
93+
additionalData: `$color: red;`
9394
}
9495
}
9596
]

Diff for: docs/ru/guide/pre-processors.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ module.exports = {
8888
loader: 'sass-loader',
8989
options: {
9090
// вы можете также указать файл, например `variables.scss`
91+
// используйте свойство `prependData` здесь, если версия sass-loader = 8
9192
// используйте свойство `data` здесь, если версия sass-loader < 8
92-
prependData: `$color: red;`
93+
additionalData: `$color: red;`
9394
}
9495
}
9596
]

Diff for: docs/zh/guide/pre-processors.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ module.exports = {
8888
loader: 'sass-loader',
8989
options: {
9090
// 你也可以从一个文件读取,例如 `variables.scss`
91+
// 如果 sass-loader 版本 = 8,这里使用 `prependData` 字段
9192
// 如果 sass-loader 版本 < 8,这里使用 `data` 字段
92-
prependData: `$color: red;`
93+
additionalData: `$color: red;`
9394
}
9495
}
9596
]

0 commit comments

Comments
 (0)