Changeset 55193
- Timestamp:
- 02/02/2023 06:57:39 PM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/webpack/shared.js
r54307 r55193 58 58 59 59 const stylesTransform = ( mode ) => ( content ) => { 60 if ( mode === 'production' ) { 61 return postcss( [ 62 require( 'cssnano' )( { 63 preset: 'default', 64 } ), 65 ] ) 66 .process( content, { from: 'src/app.css', to: 'dest/app.css' } ) 67 .then( ( result ) => result.css ); 68 } 69 return content; 60 return postcss( [ 61 require( 'cssnano' )( { 62 preset: mode === 'production' ? 'default' : [ 63 'default', 64 { 65 discardComments: { 66 removeAll: ! content.includes( 'Copyright' ) && ! content.includes( 'License' ), 67 }, 68 normalizeWhitespace: false, 69 }, 70 ], 71 } ), 72 ] ) 73 .process( content, { from: 'src/app.css', to: 'dest/app.css' } ) 74 .then( ( result ) => result.css ); 70 75 }; 71 76
Note: See TracChangeset
for help on using the changeset viewer.