29 lines
485 B
JavaScript
29 lines
485 B
JavaScript
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
const path = require('path');
|
|
|
|
module.exports = {
|
|
mode: 'production',
|
|
plugins: [
|
|
new MiniCssExtractPlugin({
|
|
filename: '[name].css',
|
|
chunkFilename: '[id].css',
|
|
}),
|
|
],
|
|
entry: './src/index.js',
|
|
output: {
|
|
filename: 'main.js',
|
|
path: path.resolve(__dirname, 'dist'),
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.css$/,
|
|
use: [
|
|
MiniCssExtractPlugin.loader,
|
|
'css-loader',
|
|
],
|
|
},
|
|
],
|
|
},
|
|
};
|