我只能在下看到实际的应用/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
node_modules
上市
的CSS
img
bundle.js
index.html
package.json
webpack.config.js
我如何修改以确保该http://localhost:8080/
条目本身是针对应用程序的?
您还可以将
--content-base
标志添加到启动脚本中,例如