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
{{ message }}
This repository was archived by the owner on Dec 26, 2018. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+26-4Lines changed: 26 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -135,10 +135,6 @@ module.exports = {
135
135
}
136
136
```
137
137
138
-
## Autoprefix by Default
139
-
140
-
Starting in 5.0.0, all CSS output via vueify will be autoprefixed by default. See [config section](#configuring-options) on customizing the options.
141
-
142
138
## Enabling Pre-Processors
143
139
144
140
You need to install the corresponding node modules to enable the compilation. e.g. to get stylus compiled in your Vue components, do `npm install stylus --save-dev`.
@@ -152,6 +148,14 @@ These are the built-in preprocessors:
152
148
- coffee-script
153
149
- myth
154
150
151
+
## Autoprefix by Default
152
+
153
+
Starting in 5.0.0, all CSS output via vueify will be autoprefixed by default. See [config section](#configuring-options) below on customizing the options.
154
+
155
+
## PostCSS
156
+
157
+
Vueify uses PostCSS for scoped CSS rewrite and autoprefixing. You can also provide your own PostCSS plugins! See [config section](#configuring-options) below for an example.
158
+
155
159
## Configuring Options
156
160
157
161
Create a `vue.config.js` file at where your build command is run (usually the root level of your project):
@@ -162,6 +166,8 @@ module.exports = {
162
166
sass: {
163
167
includePaths: [...]
164
168
},
169
+
// provide your own postcss plugins
170
+
postcss: [...],
165
171
// configure autoprefixer
166
172
autoprefixer: {
167
173
browsers: ['last 2 versions']
@@ -177,6 +183,18 @@ module.exports = {
177
183
}
178
184
```
179
185
186
+
Example using custom PostCSS plugin:
187
+
188
+
```js
189
+
var cssnext =require('cssnext')
190
+
191
+
module.exports= {
192
+
postcss: [cssnext()],
193
+
// disable autoprefixer since cssnext comes with it
194
+
autoprefixer:false
195
+
}
196
+
```
197
+
180
198
Alternatively, if you are using `vueify` in Node and don't want to create a `vue.config.js` file:
181
199
182
200
```js
@@ -271,6 +289,10 @@ If you use Webpack, there's also [vue-loader](https://github.com/vuejs/vue-loade
271
289
272
290
## Changelog
273
291
292
+
### 5.0.4
293
+
294
+
- Added `postcss` option for providing custom PostCSS plugins.
0 commit comments