我正在通过 jenkins 部署 Ember CLI 应用程序并使用 nginx 发布它。这是詹金斯构建脚本:
npm install
bower install
node_modules/ember-cli/bin/ember build --environment=production
nginx 配置只是sub.domain.com
指向jenkins\jobs\lastStable\archive\dist
. 效果很好,但是当我转到页面时,它是空白的,并且控制台中的输出如下:
TypeError: Ember.Handlebars.compile is not a function vendor-92ab6507ac60a5bf7c6819aa8fc418d6.js:18
ReferenceError: Swag is not defined spa-client-9b01c6124f5b2a4cd2e95b62be7f5ba5.js:1
我猜这两个错误是相关的,但我不知道是什么原因造成的。我已经尝试过这个似乎是类似问题的答案,但它对我不起作用。在我的开发环境中一切正常,我在Brocfile.js
.