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-17Lines changed: 26 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -122,6 +122,10 @@ module.exports = function (vueify) {
122
122
}
123
123
```
124
124
125
+
## Autoprefix by Default
126
+
127
+
Starting in 5.0.0, all CSS output via vueify will be autoprefixed by default. See [config section](#configuring-options) on customizing the options.
128
+
125
129
## Enabling Pre-Processors
126
130
127
131
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`.
@@ -135,28 +139,28 @@ These are the built-in preprocessors:
135
139
- coffee-script
136
140
- myth
137
141
138
-
## Pre-Processor Configuration
142
+
## Configuring Options
139
143
140
-
Create a `vue.config.js` file at where your build command is run (usually y the root level of your project):
144
+
Create a `vue.config.js` file at where your build command is run (usually the root level of your project):
141
145
142
146
```js
143
-
module.exports=function (vueify) {
144
-
145
-
// configure the options for a built-in language
146
-
vueify.option('sass', {
147
+
module.exports= {
148
+
// configure a built-in compiler
149
+
sass: {
147
150
includePaths: [...]
148
-
})
149
-
150
-
// register a custom compile function for <script lang="es">
151
-
vueify.register({
152
-
lang:'es',
153
-
type:'script',
154
-
compile:function (content, cb) {
155
-
// transform the content...
156
-
cb(null, content)
151
+
},
152
+
// configure autoprefixer
153
+
autoprefixer: {
154
+
browsers: ['last 2 versions']
155
+
},
156
+
// register custom compilers
157
+
customCompilers: {
158
+
// for tags with lang="ts"
159
+
ts:function (content, cb) {
160
+
// compile some TypeScript...
161
+
cb(null, result)
157
162
}
158
-
})
159
-
163
+
}
160
164
}
161
165
```
162
166
@@ -236,6 +240,11 @@ If you use Webpack, there's also [vue-loader](https://github.com/vuejs/vue-loade
0 commit comments