You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An object specifying Webpack loaders to use for language blocks inside `*.vue` files. The key corresponds to the `lang` attribute for language blocks, if specified. The default `lang` for each type is:
8
+
9
+
-`<template>`: `html`
10
+
-`<script>`: `js`
11
+
-`<style>`: `css`
12
+
13
+
For example, to use `babel-loader` and `eslint-loader` to process all `<script>` blocks:
14
+
15
+
```js
16
+
// ...
17
+
vue: {
18
+
loaders: {
19
+
js:'babel!eslint'
20
+
}
21
+
}
22
+
```
23
+
24
+
### autoprefixer
25
+
26
+
- type: `Boolean`
27
+
- default: `true`
28
+
29
+
Whether to enable autoprefixer for CSS inside `*.vue` files.
30
+
31
+
### postcss
32
+
33
+
- type: `Array` or `Function`
34
+
35
+
Specify custom PostCSS plugins to be applied to CSS inside `*.vue` files. If using a function, the function will called using the same loader context and should return an Array of plugins.
36
+
37
+
```js
38
+
// ...
39
+
vue: {
40
+
// note: do not nest the `postcss` option under `loaders`
41
+
postcss: [require('postcss-cssnext')()],
42
+
autoprefixer:false,
43
+
loaders: {
44
+
// ...
45
+
}
46
+
}
47
+
```
48
+
49
+
### cssSourceMap
50
+
51
+
- type: `Boolean`
52
+
- default: `true`
53
+
54
+
Whether to enable source maps for CSS. Disabling this can avoid some relative path related bugs in `css-loader` and make the build a bit faster.
55
+
56
+
Note this is automatically set to `false` if the `devtool` option is not present in the main Webpack config.
0 commit comments