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

Add Closure compiler #569

Closed
wants to merge 14 commits into from
Prev Previous commit
Next Next commit
updateSnapshot didn't apply last time
JoviDeCroock committed Feb 18, 2020
commit ee6f99ba10fee39837b7b36e213ef9cf0f4c6949
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -592,7 +592,7 @@ function createConfig(options, entry, format, writeMeta) {
},
}),
options.compress !== false && [
options.closure && (modern || format === 'es')
options.closure && (format === 'es' || modern)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should clarify in the docs/help that Terser is always used for cjs,iife,umd formats, regardless of the --closure option.

? closureCompiler({ remove_strict_directive: true })
: terser({
sourcemap: true,
2 changes: 1 addition & 1 deletion test/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
@@ -57,6 +57,7 @@ async-iife-ts
async-iife-ts.umd.js
async-iife-ts.umd.js.map
index.d.ts
node_modules
package.json
src
index.ts
@@ -164,7 +165,6 @@ basic
basic-lib.js.map
basic-lib.umd.js
basic-lib.umd.js.map
node_modules
package.json
src
index.js