Skip to content

Commit

Permalink
build: warmup vite
Browse files Browse the repository at this point in the history
  • Loading branch information
markthree committed Mar 30, 2023
1 parent bbbe4d3 commit 63f199e
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 19 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@
"turbo": "^1.8.6",
"typescript": "^5.0.2",
"unocss": "^0.50.6",
"vite": "^4.2.1",
"vite": "^4.3.0-beta.1",
"vite-layers": "^0.3.1",
"vite-plugin-warmup": "^0.0.2",
"vue": "^3.2.47",
"vue-tsc": "^1.2.0"
},
Expand Down
51 changes: 33 additions & 18 deletions pnpm-lock.yaml

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

7 changes: 7 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ import { defineConfig } from "vite";
import Vue from "@vitejs/plugin-vue";
import { builtinModules } from "node:module";

const warmup = import("vite-plugin-warmup").then((m) =>
m.warmup({
clientFiles: ["./src/**/*"],
})
);

export default defineConfig({
build: {
emptyOutDir: false,
Expand All @@ -24,6 +30,7 @@ export default defineConfig({
},
},
plugins: [
warmup,
Vue(),
Unocss(),
],
Expand Down

0 comments on commit 63f199e

Please sign in to comment.