File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 18
18
19
19
## Usage
20
20
21
+ Install ` postcss-loader ` :
22
+
23
+ ``` js
24
+ npm install postcss- loader -- save- dev
25
+ ```
26
+
21
27
Set ` postcss ` section in webpack config:
22
28
23
29
``` js
@@ -39,6 +45,12 @@ module.exports = {
39
45
}
40
46
```
41
47
48
+ > This example implementation uses two plugins that may need to be installed:
49
+ > ```
50
+ > npm install autoprefixer --save-dev
51
+ > npm install precss --save-dev
52
+ > ```
53
+
42
54
Now your CSS files requirements will be processed by selected PostCSS plugins:
43
55
44
56
```js
@@ -65,7 +77,7 @@ If there is the need, this will let you access to webpack loaders API.
65
77
## Plugins Packs
66
78
67
79
If you want to process different styles by different PostCSS plugins you can
68
- define plugin packs in ` postcss ` section and use them by ` ?pack=name ` parameter.
80
+ define plugin packs in ` postcss ` section and use them by ` ?pack=name ` parameter.
69
81
70
82
``` js
71
83
module .exports = {
@@ -93,7 +105,7 @@ module.exports = {
93
105
## Integration with postcss-import
94
106
95
107
When using [ postcss-import] plugin, you may want to tell webpack about
96
- dependencies coming from your ` @import ` directives.
108
+ dependencies coming from your ` @import ` directives.
97
109
For example: in watch mode, to enable recompile on change.
98
110
99
111
Here is a simple way to let know postcss-import to pass files to webpack:
You can’t perform that action at this time.
0 commit comments