Refactor module (loader) rules
- Removed unnecessary url-loader targeting .woff files - Replaced file-loader with url-loader (file is fallback for url) - PostCSS plugins are all loaded manually vs postcss.config.js
This commit is contained in:
15
resources/assets/build/postcss.config.js
Normal file
15
resources/assets/build/postcss.config.js
Normal file
@@ -0,0 +1,15 @@
|
||||
/* eslint-disable */
|
||||
|
||||
const cssnanoConfig = {
|
||||
preset: ['default', { discardComments: { removeAll: true } }]
|
||||
};
|
||||
|
||||
module.exports = ({ file, options }) => {
|
||||
return {
|
||||
parser: options.enabled.optimize ? 'postcss-safe-parser' : undefined,
|
||||
plugins: {
|
||||
cssnano: options.enabled.optimize ? cssnanoConfig : false,
|
||||
autoprefixer: true,
|
||||
},
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user