File size: 911 Bytes
181e22f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const {
cssLoaderWithModules,
cssLoaderWithoutModules,
postcssLoader,
stylusLoader,
babelLoader,
} = require('./loaders');
const paths = require('./paths');
module.exports = {
mode: 'production',
entry: paths.appIndexJs,
devtool: false,
output: {
path: paths.appBuild,
filename: 'index.bundle.js',
},
module: {
rules: [
{
test: [/\.(js|jsx|mjs)$/],
include: paths.appSrc,
use: [babelLoader],
},
{
test: /\.css$/,
use: [MiniCssExtractPlugin.loader, cssLoaderWithoutModules, postcssLoader],
},
{
test: /\.cm\.styl$/,
use: [MiniCssExtractPlugin.loader, cssLoaderWithModules, postcssLoader, stylusLoader],
},
],
},
plugins: [
new MiniCssExtractPlugin(),
],
devServer: {
contentBase: './build',
},
};
|