Skip to content

Commit c60551e

Browse files
committed
build: add autoprefixer
1 parent d7b5c37 commit c60551e

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@
3131
},
3232
"devDependencies": {
3333
"@vitejs/plugin-vue": "^4.2.3",
34+
"autoprefixer": "^10.4.16",
3435
"eslint": "^8.50.0",
3536
"eslint-plugin-vue": "^9.17.0",
37+
"postcss": "^8.4.30",
3638
"sass": "^1.68.0",
3739
"vite": "^4.4.5"
3840
}

vite.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { defineConfig, loadEnv } from 'vite'
22
import vue from '@vitejs/plugin-vue'
33
import path from 'node:path'
4+
import autoprefixer from 'autoprefixer'
45

56
export default defineConfig(({ mode }) => {
67
// Load .env
@@ -9,6 +10,13 @@ export default defineConfig(({ mode }) => {
910

1011
return {
1112
plugins: [vue()],
13+
css: {
14+
postcss: {
15+
plugins: [
16+
autoprefixer({}) // add options if needed
17+
],
18+
}
19+
},
1220
resolve: {
1321
alias: [
1422
// webpack path resolve to vitejs

0 commit comments

Comments
 (0)