File tree Expand file tree Collapse file tree 1 file changed +0
-65
lines changed Expand file tree Collapse file tree 1 file changed +0
-65
lines changed Original file line number Diff line number Diff line change @@ -25,12 +25,6 @@ npm install postcss-loader --save-dev
25
25
26
26
## Usage
27
27
28
- You can configure PostCSS Loader in common PostCSS config or directly
29
- in Webpack config. Common PostCSS config is recommended way, because
30
- many PostCSS tools will be able to share it.
31
-
32
- ### PostCSS Config
33
-
34
28
Add PostCSS Loader to ` webpack.config.js ` . Put it after ` css-loader `
35
29
and ` style-loader ` . But before ` sass-loader ` , if you use it.
36
30
@@ -71,65 +65,6 @@ You can read more about common PostCSS config in [postcss-load-config].
71
65
72
66
[ postcss-load-config ] : https://github.com/michael-ciniawsky/postcss-load-config
73
67
74
- ### Webpack 2.x Config
75
-
76
- ``` js
77
- module .exports = {
78
- module: {
79
- rules: [
80
- {
81
- test: / \. css$ / ,
82
- use: [
83
- ' style-loader' ,
84
- {
85
- loader: ' css-loader' ,
86
- options: { importLoaders: 1 }
87
- },
88
- {
89
- loader: ' postcss-loader' ,
90
- options: {
91
- plugins : function () {
92
- return [
93
- require (' postcss-smart-import' )({ /* ...options */ }),
94
- require (' precss' )({ /* ...options */ }),
95
- require (' autoprefixer' )({ /* ...options */ })
96
- ];
97
- }
98
- }
99
- }
100
- ]
101
- }
102
- ]
103
- }
104
- }
105
- ```
106
-
107
- ### Webpack 1.x Config
108
-
109
- ``` js
110
- module .exports = {
111
- module: {
112
- loaders: [
113
- {
114
- test: / \. css$ / ,
115
- loaders: [
116
- ' style-loader' ,
117
- ' css-loader?importLoaders=1' ,
118
- ' postcss-loader'
119
- ]
120
- }
121
- ]
122
- },
123
- postcss : function () {
124
- return [
125
- require (' postcss-smart-import' )({ /* ...options */ }),
126
- require (' precss' )({ /* ...options */ }),
127
- require (' autoprefixer' )({ /* ...options */ })
128
- ];
129
- }
130
- }
131
- ```
132
-
133
68
## Options
134
69
135
70
### Syntaxes
You can’t perform that action at this time.
0 commit comments