gpt4 book ai didi

javascript - webpack入口和输出路径

转载 作者:行者123 更新时间:2023-11-28 04:59:44 25 4
gpt4 key购买 nike

我有一个这样的文件目录

enter image description here

我的 webpack.config.js 看起来像

module.exports = {
entry: [
'webpack/hot/dev-server',
'webpack-hot-middleware/client',
'./resources/assets/bundle/entries/feed.js'],
output: {
path : path.join(__dirname, 'public/bundle'),
publicPath : '/',
filename : 'bundle.js'
}
}

出了什么问题?为什么我在 public/bundle/bundle.js 中找不到bundle.js?我跑http://localhost:3000/bundle/bundle.js我收到 404 错误嗯..

最佳答案

在开发者模式下,webpack 不会在硬盘中生成文件。如果您在生产模式下运行 webpack,您将看到生成的文件。

关于javascript - webpack入口和输出路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42229955/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com