Skip to content

Commit 39dc2a4

Browse files
committed
chore(dev): add production playground script
1 parent 0fbdd0c commit 39dc2a4

File tree

5 files changed

+8
-2
lines changed

5 files changed

+8
-2
lines changed

packages/vuetify/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
/lib-temp/
88
/types-temp/
99
/dist/
10+
/dev/dist/
1011

1112
# local env files
1213
.env.local

packages/vuetify/dev/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
</head>
1111
<body>
1212
<div id="app"></div>
13-
<script type="module" src="./index.js"></script>
13+
<script type="module" src="/index.js"></script>
1414
</body>
1515
</html>

packages/vuetify/dev/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ import { routes } from './router'
1010

1111
library.add(fas)
1212

13-
export default viteSSR(App, { routes }, ({ app }) => {
13+
viteSSR(App, { routes }, ({ app }) => {
1414
const head = createHead()
1515

16+
// app.config.performance = true
1617
app.use(head)
1718
app.use(vuetify)
1819
app.component('FontAwesomeIcon', FontAwesomeIcon)

packages/vuetify/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
"watch": "yarn build:lib --watch",
9393
"dev": "cross-env NODE_ENV=development vite",
9494
"dev:ssr": "cross-env NODE_ENV=development VITE_SSR=true vite-ssr",
95+
"dev:prod": "cross-env NODE_ENV=production vite build && vite preview",
9596
"build": "rimraf lib dist && concurrently \"yarn build:dist\" \"yarn build:lib\" -n \"dist,lib\" --kill-others-on-fail -r && yarn build:types",
9697
"build:dist": "rollup --config build/rollup.config.js",
9798
"build:lib": "cross-env NODE_ENV=lib babel src --out-dir lib --source-maps --extensions \".ts\",\".tsx\",\".snap\" --copy-files --no-copy-ignored --out-file-extension .mjs",

packages/vuetify/vite.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ export default defineConfig(({ mode }) => {
5959
__VUETIFY_VERSION__: JSON.stringify(vuetifyPackage.version),
6060
'process.env.BABEL_TYPES_8_BREAKING': 'false',
6161
'process.env.VITE_SSR': process.env.VITE_SSR,
62+
},
63+
build: {
64+
minify: false,
6265
}
6366
}
6467
})

0 commit comments

Comments
 (0)