mirror of
https://github.com/rottenwheel/moner.ooo.git
synced 2024-11-09 20:53:46 +01:00
chore: optimize CSS imports and PurgeCSS config
Switched to non-minified Bootstrap CSS for improved readability during development. Updated Webpack MiniCssExtractPlugin filename pattern to handle multiple CSS outputs more gracefully. Enhanced PurgeCSSPlugin configuration by incorporating JS paths and limiting removal to specific Bootstrap classes to avoid issues with dynamic class usage.
This commit is contained in:
parent
ab4e1ad044
commit
035da04bf8
@ -1,4 +1,4 @@
|
||||
import 'bootstrap/dist/css/bootstrap.min.css';
|
||||
import 'bootstrap/dist/css/bootstrap.css';
|
||||
import 'bootstrap/dist/js/bootstrap.bundle.min';
|
||||
|
||||
import '../css/custom.css';
|
||||
|
@ -25,13 +25,15 @@ module.exports = {
|
||||
},
|
||||
plugins: [
|
||||
new MiniCssExtractPlugin({
|
||||
filename: '../css/main.css'
|
||||
filename: '../css/[name].css'
|
||||
}),
|
||||
new PurgeCSSPlugin({
|
||||
paths: glob.sync([
|
||||
path.join(__dirname, 'index.php')
|
||||
path.join(__dirname, 'index.php'),
|
||||
path.join(__dirname, 'src/js/**/*.js')
|
||||
]),
|
||||
only: ['bootstrap'],
|
||||
safelist: ['tooltip', 'fade', 'show', 'bs-tooltip-top', 'tooltip-inner', 'tooltip-arrow', 'btn-equals', 'btn-arrow', 'alert', 'alert-warning']
|
||||
})
|
||||
]
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user