I have a Laravel Application with a webpack.config.js
quite similar to this one:
const path = require('path')
module.exports = {
entry: { app: ['./app/Http/app.js'] },
mode: 'development',
output: {
path: path.resolve(__dirname, 'public/'),
filename: 'assets/js/[name].js',
publicPath: '/'
},
plugins: [],
module: {
rules: [
{ test: /\.css$/, use: ['style-loader', 'css-loader'] },
{ test: /\.(sass|scss)$/, use: ['style-loader', 'css-loader', 'sass-loader']},
...
]
}
}
This config will generate a bundle javascript app.js
which is good for my frontend. However I would like generate another bundle from sass files:
Input:
app/assets/sass/print.sass
Output:
public/css/print.css
What should I change on my Webpack config to do this additional side generation?