From 2ea7ec3dcf1ffd7ea9fcb58a437db9a89709998c Mon Sep 17 00:00:00 2001 From: Rongjian Zhang Date: Fri, 3 May 2024 18:42:15 +0800 Subject: [PATCH] chore: add sourcemap for debug --- vite.main.config.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vite.main.config.mjs b/vite.main.config.mjs index b597b21..455503f 100644 --- a/vite.main.config.mjs +++ b/vite.main.config.mjs @@ -12,8 +12,11 @@ export default defineConfig((env) => { const forgeEnv = env; const { forgeConfigSelf } = forgeEnv; const define = getBuildDefine(forgeEnv); + + /** @type {import('vite').UserConfig} */ const config = { build: { + sourcemap: true, lib: { entry: forgeConfigSelf.entry, fileName: () => "[name].js",