如何解决运行Webpack开发服务器时浏览器返回404错误
我在远程服务器上使用带有Webpacker的Rails 6。
运行bin/webpack-dev-server
时,它返回:
ℹ 「wds」: Project is running at https://MY_HOST:3035/
ℹ 「wds」: webpack output is served from /packs/
ℹ 「wds」: Content not from webpack is served from /PATH/public/packs
ℹ 「wds」: 404s will fallback to /index.html`
访问URL时,打包URL返回404错误:
https://MY_HOST/packs/js/application-HASH.js net::ERR_ABORTED 404 (Not Found)
当我使用bin/webpack --watch
这是dev_server配置:
dev_server:
https: true
host: '0.0.0.0'
port: 3035
public: MY_HOST:3035
hmr: false
# Inline should be set to true if using HMR
inline: true
overlay: true
compress: true
disable_host_check: true
use_local_ip: false
quiet: false
pretty: false
headers:
'Access-Control-Allow-Origin': '*'
watch_options:
ignored: '**/node_modules/**'
manifest.json
散列与webpack开发服务器生成的散列相同。
我似乎无法理解问题所在。
我真的很感谢任何指针。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。