Initial Drupal 11 with DDEV setup
This commit is contained in:
14
web/core/scripts/css/remove-unwanted-comments.js
Normal file
14
web/core/scripts/css/remove-unwanted-comments.js
Normal file
@ -0,0 +1,14 @@
|
||||
// On import, remove the comments, so they don't appear as useless comments at the top of the autogenerated css files.
|
||||
module.exports = opts => {
|
||||
return {
|
||||
postcssPlugin: 'remove-unwanted-comments',
|
||||
Once(css) {
|
||||
css.walk(node => {
|
||||
if (node.type === 'comment') {
|
||||
node.remove();
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
module.exports.postcss = true
|
||||
Reference in New Issue
Block a user