简体   繁体   English

部署 Nuxt Universal 项目 - 是否需要整个 .nuxt 文件夹?

[英]Deploying Nuxt Universal project - is the whole .nuxt folder necessary?

I have run the npm run build and it has created the dist folder in the .nuxt directory.我已经运行了npm run build ,它在.nuxt目录中创建了dist文件夹。 Do I need just the dist folder in production, or should I include the whole .nuxt directory?我是否只需要生产中的dist文件夹,还是应该包含整个.nuxt目录?

Yes, I think you need the whole .nuxt folder.是的,我认为您需要整个 .nuxt 文件夹。 Your web root should look something like this:您的 Web 根目录应如下所示:

  • .nuxt .nu​​xt
  • static静止的
  • nuxt.config.js nuxt.config.js
  • package.json包.json
  • server.js服务器.js

Just checked on my server.刚刚检查了我的服务器。 This might be true only for Amazon Beanstalk...这可能仅适用于 Amazon Beanstalk...

After running npm run build on my development computer, I needed the following on the server:在我的开发计算机上运行npm run build后,我需要在服务器上执行以下操作:

  • .nuxt/dist/
  • static/
  • server/ or server.js - depends on setup server/server.js - 取决于设置
  • package.json
  • package-lock.json
  • nuxt.config.conf

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM