Skip to content

Commit 6197578

Browse files
committed
feat(bundler-vite): configure postcss by default
1 parent 151e087 commit 6197578

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

packages/@vuepress/bundler-vite/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
"@vuepress/core": "2.0.0-beta.15",
3636
"@vuepress/shared": "2.0.0-beta.7",
3737
"@vuepress/utils": "2.0.0-beta.15",
38+
"autoprefixer": "^10.2.5",
39+
"postcss": "^8.3.0",
40+
"postcss-csso": "^5.0.1",
3841
"rollup": "^2.50.1",
3942
"vite": "^2.3.4",
4043
"vue": "^3.0.11",

packages/@vuepress/bundler-vite/src/plugin/createPlugin.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ export const createPlugin = ({
6060
resolve: {
6161
alias: await resolveAlias({ app }),
6262
},
63+
css: {
64+
postcss: {
65+
plugins: [
66+
require('autoprefixer'),
67+
...(isBuild ? [require('postcss-csso')] : []),
68+
],
69+
},
70+
},
6371
server: {
6472
host: app.options.host,
6573
port: app.options.port,

0 commit comments

Comments
 (0)