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

How do I strip away license comments as well? #99

Open
hrstoyanov opened this issue Dec 22, 2020 · 2 comments
Open

How do I strip away license comments as well? #99

hrstoyanov opened this issue Dec 22, 2020 · 2 comments

Comments

@hrstoyanov
Copy link

It looks like , by default comments are removed, but license comments are left in? I would like to remove everything for the smallest package possible...

@artemjackson
Copy link

artemjackson commented Dec 20, 2021

@hrstoyanov Try to pass { format: { comments: false } } as the plugin options.

Ref: https://github.com/terser/terser#format-options

@zhaoyiming0803
Copy link

@hrstoyanov Try to pass { format: { comments: false } } as the plugin options.

Ref: https://github.com/terser/terser#format-options

It doesn't seem to work:

{
  "rollup-plugin-terser": "^7.0.2"
}
{
  plugins: [
    terser({
        module: true,
        compress: {
          ecma: 2015,
          pure_getters: true
        },
        format: { comments: false },
        safari10: true
      })
  ]
}

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

3 participants