vite-plugin-qiankun
vite-plugin-qiankun copied to clipboard
生产环境跳转子应用时报错[import-html-entry]: error occurs while executing normal script
主应用和子应用都是vite构建的vue3项目,子应用使用此依赖,在开发环境可以正常跳转,但是打包到线上环境跳转时会报以下错误:

i think problem is related to the fact that qiankun not supports top level import
这个问题已解决,是由于线上环境找不到资源报的错,需要在子项目的config中添加配置: export const viteConfig = defineConfig(({ command, mode }) => ({ ... // 嵌套公共路径部署,路径重写 base: mode === 'development' ? './' : '对应环境的地址', ...... }));