我只能在/public
.
中的配置webpack.config.js
如下:
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: [
'webpack-dev-server/client?http://localhost:8080',
'webpack/hot/only-dev-server',
'./app/js/App.js'
],
output: {
path: path.join(__dirname, 'public'),
filename: 'bundle.js',
publicPath: 'http://localhost:8080'
},
module: {
loaders: [
{
test: /\.js$/,
loaders: ['react-hot', 'babel-loader'],
exclude: /node_modules/
}
]
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
]
};
项目层次结构是:
应用程序
- js
节点module
上市
css
图片
包.js
索引.html
包.json
webpack.config.js
如何修改以确保http://localhost:8080/
条目本身适用于应用程序?