moner.ooo/webpack.config.js
Kumi 227d56a2bd
feat: enhance accessibility and UI feedback
Added a noscript alert message for users with JavaScript disabled, informing them about the limitations and manual controls available. Improved UI spacing with an additional margin in the conversion button section. Adjusted CSS padding for better visual alignment. Expanded Webpack safelist to include alert classes for proper styling.
2024-08-10 16:43:57 +02:00

37 lines
No EOL
874 B
JavaScript

'use strict'
const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const { PurgeCSSPlugin } = require("purgecss-webpack-plugin");
const glob = require('glob-all');
module.exports = {
mode: 'development',
entry: './src/js/main.js',
output: {
filename: 'main.js',
path: path.resolve(__dirname, 'js'),
},
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')
]),
safelist: ['tooltip', 'fade', 'show', 'bs-tooltip-top', 'tooltip-inner', 'tooltip-arrow', 'btn-equals', 'btn-arrow', 'alert', 'alert-warning']
})
]
};