mirror of
https://github.com/rottenwheel/moner.ooo.git
synced 2024-12-22 08:07:47 +00: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
2 changed files with 6 additions and 4 deletions
|
@ -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,12 +25,14 @@ 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 a new issue