bovender/webpack.config.js

25 lines
500 B
JavaScript
Raw Normal View History

2019-12-22 04:44:48 +00:00
const path = require('path');
2019-12-22 08:43:15 +00:00
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
2019-12-22 04:44:48 +00:00
module.exports = {
entry: './src/component.js',
output: {
filename: 'component.js',
path: path.resolve(__dirname, 'assets'),
},
mode: 'production',
2019-12-22 08:43:15 +00:00
plugins: [new MiniCssExtractPlugin()],
2019-12-22 04:44:48 +00:00
module: {
rules: [
{
test: /\.[s]css$/,
use: [
'style-loader',
2019-12-22 08:43:15 +00:00
MiniCssExtractPlugin.loader,
2019-12-22 04:44:48 +00:00
'css-loader',
],
},
],
},
};