Skip to content

Commit 06013c1

Browse files
committed
v1.4.0
1 parent 5ba5ab5 commit 06013c1

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

vite.config.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ import pkg from "./package.json";
77
import path from "node:path";
88
import {AppConfig} from "./src/config";
99
import dayjs from "dayjs";
10+
import utc from "dayjs/plugin/utc";
11+
import timezone from "dayjs/plugin/timezone";
12+
13+
dayjs.extend(utc);
14+
dayjs.extend(timezone);
1015

1116
// https://vitejs.dev/config/
1217
export default defineConfig(({command}) => {
@@ -40,7 +45,7 @@ export default defineConfig(({command}) => {
4045
{
4146
name: "add-build-time",
4247
generateBundle() {
43-
const buildId = dayjs().format("YYYYMMDDHHmmss");
48+
const buildId = dayjs().tz("Asia/Shanghai").format("YYYYMMDDHHmmss");
4449
this.emitFile({
4550
type: "asset",
4651
fileName: "build.json",

0 commit comments

Comments
 (0)