我有一个简单的Rails 5.1应用程序,它使用Webpacker和Vue.js. 它在开发中非常有效webpack-dev-server.当我推送到Heroku存储库时,它完成没有任何错误,没有任何看似异常的东西.HTML页面呈现但是<div id="app">应该呈现Vue.js应用程序的元素仅由注释替换:
<!--function (e,n,r,o){return on(t,e,n,r,o,!0)}-->
Run Code Online (Sandbox Code Playgroud)
JavaScript包文件确实在那里,我看着它,它似乎都是正确的.
我尝试使用Node.js Buildpack替换正常的Ruby buildpack,然后使用Ruby Buildpack替换,但无济于事.这是完整的Heroku部署日志:
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NPM_CONFIG_PRODUCTION=true
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)
engines.yarn (package.json): unspecified (use default)
Resolving node version 8.x...
Downloading and installing node 8.9.4...
Using default npm version: 5.6.0
Resolving yarn version 1.x...
Downloading and installing yarn (1.4.0)...
Installed yarn 1.4.0
-----> Restoring cache
Skipping cache restore (not-found)
-----> Building …Run Code Online (Sandbox Code Playgroud)