Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keep_classnames and keep_fnames missing from TypeScript definition file #59

Closed
StephenWeatherford opened this issue Jan 16, 2019 · 1 comment

Comments

@StephenWeatherford
Copy link

  • Operating System: N/A
  • Node Version: N/A
  • NPM Version: N/A
  • webpack Version: 4.28.1
  • terser-webpack-plugin Version: 1.2.1

Expected Behavior

No typescript warnings in webpack.config.js file

keep_classnames and keep_fnames should be defined in typescript definition file but are not:

export interface MinifyOptions {
spidermonkey?: boolean;
outSourceMap?: string;
sourceRoot?: string;
inSourceMap?: string;
fromString?: boolean;
warnings?: boolean;
mangle?: boolean | MangleOptions;
output?: OutputOptions;
compress?: boolean | CompressOptions;
nameCache?: {};
}

Actual Behavior

Typescript squigglies:
image

Code

    optimization: {
        minimizer: [
            new TerserPlugin({
                terserOptions: {
                    // https://github.com/webpack-contrib/terser-webpack-plugin/

                    // Without this, parseError() will not recognize user cancelled errors.  Also makes debugging easier in production.
                    keep_classnames: true
                }
            }),
        ],
    },```

### How Do We Reproduce?

<!--
  Remove this section if not reporting a bug.

  If your webpack config is over 50 lines long, please provide a URL to a repo
  for your beefy 🍖 app that we can use to reproduce.
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants