Skip to content
This repository has been archived by the owner on Mar 12, 2023. It is now read-only.

How to uglify JS #117

Open
yonkov opened this issue Jan 22, 2021 · 1 comment
Open

How to uglify JS #117

yonkov opened this issue Jan 22, 2021 · 1 comment

Comments

@yonkov
Copy link

yonkov commented Jan 22, 2021

I installed the extension JS & CSS Minifier in Visual Studio Code. I am trying to minify and compress my js, so that all variable names get shortened/uglified in the compiled file. For example, if i have the following code:

var firstValueName = 10

I would like to have it converted in the minified file to something like:

var a=10

How do I do that?

I tried adding the following configuration to VS Code but it does not seem to work:

  "es6-css-minify.autoprefixer": {
    "es6-css-minify.js" : {
      "mangle": true
    }    
  }
@rambhosale
Copy link

Here are my configurations give it a try

    "es6-css-minify.minifyOnSave": "exists",
    "es6-css-minify.js": {
        "mangle": true,
        "compress": {
            "unused": true
        },
        "output": {
            "quote_style": 0
        }
    },

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants