config-min.js 436 B

123456789101112131415161718192021
  1. const config = require( './config' );
  2. const TerserPlugin = require( 'terser-webpack-plugin' );
  3. module.exports = {
  4. ...config,
  5. output : {
  6. filename: 'splide.min.js',
  7. environment: config.output.environment,
  8. },
  9. optimization: {
  10. minimize : true,
  11. minimizer: [ new TerserPlugin( {
  12. terserOptions: {
  13. format: {
  14. comments: /^\**!|@preserve|@license|@cc_on/i,
  15. },
  16. },
  17. extractComments: false,
  18. } ) ],
  19. },
  20. };