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_quoted is not a supported option #10

Closed
cooervo opened this issue Mar 22, 2019 · 2 comments
Closed

keep_quoted is not a supported option #10

cooervo opened this issue Mar 22, 2019 · 2 comments

Comments

@cooervo
Copy link

cooervo commented Mar 22, 2019

So I'm trying to use gulp-terser and which to use the keep_quoted like::


function terser() {
    return gulp.src('js/**/*.js')
        .pipe(gTerser({
            keep_fnames: false, 
            keep_quoted: true,  // <====== doesn't work here
            mangle: {
                 keep_quoted: true,  // <==== neither here
                properties: true,
                keep_fnames: false,
            }
        }))
        .pipe(gulp.dest(`${destStatic}/js/`))
}

but sadly keep getting error: keep_quoted is not a supported option

@duan602728596
Copy link
Owner

duan602728596 commented Mar 23, 2019

You can try this configuration:

function terser() {
    return gulp.src('js/**/*.js')
        .pipe(gTerser({
            keep_fnames: false, 
            mangle: {
                properties: {
                    keep_quoted: true
                },
                keep_fnames: false,
            }
        }))
        .pipe(gulp.dest(`${destStatic}/js/`))
}

You can find it here: https://github.com/terser-js/terser#minify-options

@cooervo
Copy link
Author

cooervo commented Mar 23, 2019

Thanks for fast reply Duan, that solves the issue!

@cooervo cooervo closed this as completed Mar 23, 2019
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