Skip to content

Commit

Permalink
chore: use actual production build for playground build and preview
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Dec 1, 2024
1 parent 516d4ed commit d6415d8
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 59 deletions.
5 changes: 3 additions & 2 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
"type": "module",
"scripts": {
"dev": "node ./setup/vite.js",
"build": "node ./setup/vite.js build",
"preview": "node ./setup/vite.js preview"
"build": "vite build -c vite.prod.config.ts",
"preview": "vite preview -c vite.prod.config.ts"
},
"dependencies": {
"@vueuse/core": "^11.1.0",
"vue": "workspace:*"
},
"devDependencies": {
"@vitejs/plugin-vue": "https://pkg.pr.new/@vitejs/plugin-vue@481bcd4",
"@vue/compiler-sfc": "workspace:*",
"vite": "catalog:",
"vite-hyper-config": "^0.4.0",
"vite-plugin-inspect": "^0.8.7"
Expand Down
21 changes: 21 additions & 0 deletions playground/vite.prod.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { defineConfig } from 'vite'
import Vue from '@vitejs/plugin-vue'
import * as CompilerSFC from '@vue/compiler-sfc'

export default defineConfig({
build: {
target: 'esnext',
minify: 'terser',
terserOptions: {
compress: {
pure_getters: true,
},
},
},
clearScreen: false,
plugins: [
Vue({
compiler: CompilerSFC,
}),
],
})
117 changes: 60 additions & 57 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d6415d8

Please sign in to comment.