mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2024-11-23 18:05:54 +03:00
48 lines
1.1 KiB
JavaScript
48 lines
1.1 KiB
JavaScript
'use strict';
|
|
const path = require('path');
|
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
|
|
|
|
module.exports = {
|
|
devtool: 'inline-source-map',
|
|
mode: 'development',
|
|
entry: './templates/index.ts',
|
|
output: {
|
|
filename: 'bundle.js',
|
|
path: path.resolve(__dirname, './static-assets/bundle/'),
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.tsx?$/,
|
|
loader: 'ts-loader',
|
|
},
|
|
|
|
{
|
|
test: /\.s[ac]ss$/i,
|
|
use: [
|
|
MiniCssExtractPlugin.loader,
|
|
'css-loader',
|
|
{
|
|
loader: 'sass-loader',
|
|
options: {
|
|
implementation: require('dart-sass'),
|
|
},
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
resolve: {
|
|
extensions: ['.ts', '.tsx', '.js'],
|
|
},
|
|
|
|
plugins: [new MiniCssExtractPlugin()],
|
|
optimization: {
|
|
minimizer: [
|
|
// For webpack@5 you can use the `...` syntax to extend existing minimizers (i.e. `terser-webpack-plugin`), uncomment the next line
|
|
`...`,
|
|
new CssMinimizerPlugin(),
|
|
],
|
|
},
|
|
};
|