Skip to content

Commit 5f0d354

Browse files
LinusBorgkazupon
authored andcommitted
Explain SASS caveat (#517)
* Explain SASS caveat improvement according to #453 * Update pre-processors.md * typo
1 parent 2fb9b71 commit 5f0d354

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docs/en/configurations/pre-processors.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,25 @@ npm install sass-loader node-sass --save-dev
1818

1919
Under the hood, the text content inside the `<style>` tag will be first compiled by `sass-loader` before being passed on for further processing.
2020

21+
#### sass-loader caveat
22+
23+
Contrary to what its name indicates, [*sass*-loader](https://github.com/jtangelder/sass-loader) parses *SCSS* syntax by default. If you actually want to use the indented *SASS* syntax, you have to configure vuel-loader's options for sass-loader accordingly.
24+
25+
```javascript
26+
{
27+
test: /\.vue$/,
28+
loader: 'vue-loader',
29+
options: {
30+
loaders: {
31+
scss: 'vue-style-loader!css-loader!sass-loader' // <style lang="scss">
32+
sass: 'vue-style-loader!css-loader!sass-loader?indentedSyntax' // <style lang="sass">
33+
}
34+
}
35+
}
36+
```
37+
38+
See the [Advanced Loader Configuration](./advanced.md) Section for further information about how to configure vue-loader.
39+
2140
### JavaScript
2241

2342
All JavaScript inside Vue components are processed by `babel-loader` by default. But you can of course change it:

0 commit comments

Comments
 (0)