2024-05-24 14:48:12 +00:00
|
|
|
'use strict'
|
|
|
|
|
2024-08-08 06:43:32 +00:00
|
|
|
const path = require('path');
|
|
|
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
|
|
const { PurgeCSSPlugin } = require("purgecss-webpack-plugin");
|
|
|
|
const glob = require('glob-all');
|
2024-05-24 14:48:12 +00:00
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
mode: 'development',
|
|
|
|
entry: './src/js/main.js',
|
|
|
|
output: {
|
|
|
|
filename: 'main.js',
|
|
|
|
path: path.resolve(__dirname, 'js'),
|
|
|
|
},
|
2024-08-08 06:43:32 +00:00
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.css$/,
|
|
|
|
use: [
|
|
|
|
MiniCssExtractPlugin.loader,
|
|
|
|
'css-loader'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new MiniCssExtractPlugin({
|
|
|
|
filename: '../css/main.css'
|
|
|
|
}),
|
|
|
|
new PurgeCSSPlugin({
|
|
|
|
paths: glob.sync([
|
|
|
|
path.join(__dirname, 'index.php')
|
|
|
|
]),
|
2024-08-10 14:23:52 +00:00
|
|
|
safelist: ['tooltip', 'fade', 'show', 'bs-tooltip-top', 'tooltip-inner', 'tooltip-arrow', 'btn-equals', 'btn-arrow']
|
2024-08-08 06:43:32 +00:00
|
|
|
})
|
|
|
|
]
|
|
|
|
};
|