Skip to content

docs: 'prependData' option renamed to 'additionalData' in sass-loader 9 #1714

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/guide/pre-processors.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Note that `sass-loader` processes the non-indent-based `scss` syntax by default.

### Sharing Global Variables

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

``` js
// webpack.config.js -> module.rules
Expand All @@ -88,8 +88,9 @@ Note that `sass-loader` processes the non-indent-based `scss` syntax by default.
loader: 'sass-loader',
options: {
// you can also read from a file, e.g. `variables.scss`
// use `data` here if sass-loader version < 8
prependData: `$color: red;`
// use `prependData` here if sass-loader version = 8, or
// `data` if sass-loader version < 8
additionalData: `$color: red;`
}
}
]
Expand Down
3 changes: 2 additions & 1 deletion docs/ru/guide/pre-processors.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ module.exports = {
loader: 'sass-loader',
options: {
// вы можете также указать файл, например `variables.scss`
// используйте свойство `prependData` здесь, если версия sass-loader = 8
// используйте свойство `data` здесь, если версия sass-loader < 8
prependData: `$color: red;`
additionalData: `$color: red;`
}
}
]
Expand Down
3 changes: 2 additions & 1 deletion docs/zh/guide/pre-processors.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ module.exports = {
loader: 'sass-loader',
options: {
// 你也可以从一个文件读取,例如 `variables.scss`
// 如果 sass-loader 版本 = 8,这里使用 `prependData` 字段
// 如果 sass-loader 版本 < 8,这里使用 `data` 字段
prependData: `$color: red;`
additionalData: `$color: red;`
}
}
]
Expand Down