module.exports = {
entry: {
bundle1: './src/bundle1/bundle1.js',
bundle2: './src/bundle2/bundle2.js',
},
output: {
path: path.resolve(__dirname, 'dist'),
},
module: {
rules: [
{
test: /bandle1\/.*\.(sa|sc|c)ss$/i,
use: [
{ loader: 'style-loader', options: { injectType: 'linkTag' } }
'css-loader',
{
loader: 'file-loader',
options: {
outputPath: './bundle1/css',
publicPath: '/bundle1/css',
name: '[name],css',
}
},
],
},
{
test: /bandle2\/.*\.(sa|sc|c)ss$/i,
use: [
{ loader: 'style-loader', options: { injectType: 'linkTag' } }
'css-loader',
{
loader: 'file-loader',
options: {
outputPath: './bundle2/css',
publicPath: '/bundle2/css',
name: '[name],css',
}
},
],
},
]
}
}