Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

部署后无法加载nuxt子应用 #42

Open
sm1022 opened this issue Sep 8, 2021 · 1 comment
Open

部署后无法加载nuxt子应用 #42

sm1022 opened this issue Sep 8, 2021 · 1 comment

Comments

@sm1022
Copy link

sm1022 commented Sep 8, 2021

请教一下:主应用为nuxt,两个子应用分别为vue-cli和nuxt创建的两个工程,在构建成功生成dist静态资源目录后,nuxt子应用无法加载,vue-cli子应用是正常的,该demo为example目录的示范程序:nuxt-main-register-demo

@wangjing013
Copy link

wangjing013 commented Nov 14, 2021

请教一下:主应用为nuxt,两个子应用分别为vue-cli和nuxt创建的两个工程,在构建成功生成dist静态资源目录后,nuxt子应用无法加载,vue-cli子应用是正常的,该demo为example目录的示范程序:nuxt-main-register-demo

开发环境跑正常 ? 通常不生效可以查看下 nuxt.js 版本, 该包默认只会是特定版本(2.11.0)才会开启. 如果大于 2.11.0 可以强制开启,在 nuxt.config.js 配置文件中添加 force 选项.

// nuxt.config.js
{
   //...
   force: true
}

其次得把错误信息贴出来,这个加载不成功有其它因素. 比如 publicPath、部署问题等

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants