Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 laravel vue 项目在开发中运行良好,但在实时共享托管服务器上,vue 组件没有显示,但 laravel 视图工作正常。控制台中没有错误。我在部署之前运行 npm run production 以缩小生产,并将 vue.config 模式设置为生产。我尝试了在这里找到的其他一些建议;热重载浏览器,清除浏览器缓存,尝试另一个共享托管服务器,但没有一个对我有用。任何帮助,将不胜感激。这是我在 package.json 文件中的脚本对象
所以我发现 webpack 正在编译到生产环境中,但没有显示警告。将此添加到我的 webpack.mix.js 后我才知道
mix.webpackConfig({ stats:{ hash: true, children: true, errors: true, errorDetails: true, warnings: true, publicPath: true, } });
此后修复了警告并解决了繁荣问题。