How to get drop_console to work cli v5 webpack5? #6925
              
                Unanswered
              
          
                  
                    
                      jeff-wishnie
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 1 comment 2 replies
-
| in  remove console 👇 module.exports = {
  chainWebpack: (config) => {
    config.optimization.minimizer('terser').tap((args) => {
      const compress = args[0].terserOptions.compress
      compress.drop_console = true
      return args
    })
  },
} | 
Beta Was this translation helpful? Give feedback.
                  
                    2 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
The following configuration worked for me with vue-cli/vue-cli-services 4 and webpack 4:
(note: For webpack v5/cli v5 I've updated
output -> format)This no longer works--
drop_consoleis not being respected.Interestingly, the output of
vue inspect --mode productionshows the following (as a snippet):Where the vue-cli-service v4 ouput shows:
Is this a bug? Is my configuration off?
Has someone gotten this to work??
Beta Was this translation helpful? Give feedback.
All reactions