diff --git a/docs/tutorial/migration-to-vue3.md b/docs/tutorial/migration-to-vue3.md index 51d86d23d0d6d62934a13fd1a928e0a89065029e..9bf5a6a51f045f19f7c8802dd0293d92a5abdc69 100644 --- a/docs/tutorial/migration-to-vue3.md +++ b/docs/tutorial/migration-to-vue3.md @@ -349,4 +349,22 @@ Vuex // 如果 nvue 使用 vuex 的各种map工具方法时,必须 return Vuex } } - ``` \ No newline at end of file + ``` + - App,小程序端源码调试,需要在 vite.config.js 中主动开启 sourcemap + + ```js + import { defineConfig } from "vite"; + import uni from "@dcloudio/vite-plugin-uni"; + + /** + * @type {import('vite').UserConfig} + */ + + export default defineConfig({ + build: { + sourcemap: true, + }, + + plugins: [uni()], + }); + ```