Closed azt3k closed 3 years ago
Hmm weird, can you post an example config for me to try?
const webpack = require('webpack');
const env = process.env.ENV || 'local';
module.exports = {
mode: 'development',
entry: {
all: [
'webpack/hot/dev-server?path=http://localhost:9000/__webpack_hmr',
__dirname + '/app/client/js/index.js'
],
'style-loader': [
'webpack/hot/dev-server?path=http://localhost:9000/__webpack_hmr',
__dirname + '/app/client/js/style-loader.js'
]
},
output: {
path: __dirname + '/public/resources/js'
},
module: {
rules: [
{
test: /\.js$/,
use: {
loader: 'babel-loader?cacheDirectory=.tmp/' + env
}
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
},
{
test: /\.(png|woff|woff2|eot|ttf|svg|gif)$/,
use: {
loader: 'url-loader?limit=100000'
}
}
]
},
plugins: [
new webpack.HotModuleReplacementPlugin()
]
};
hard coding a default of
'[hash].js'
forconfig.output.filename
means that multiple outputs don't work.