swc/node-swc/__tests__
Anders Kaseorg b87ac646f8
fix(es/minifier): Parse a file as a module only if opts.module is true (#7943)
**Description:**

Previously it was impossible to minify non-strict code (e.g. `delete identifier;`) because `minify()` unconditionally parsed the input as a module regardless of the `module` setting.

**BREAKING CHANGE:**

`minify()` now respects the `module` parameter instead of ignoring it, so users who had been processing modules with `minify()` without passing `{ module: true }` will now need to pass it.

**Related issue**

 - Closes #6130.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2023-09-13 05:55:34 +00:00
..
env Move node-swc into the repository (#789) 2020-05-22 20:36:39 +09:00
minify fix(es/minifier): Pass keep_* in config to compress and mangle (#7102) 2023-03-21 02:57:57 +00:00
parse Move node-swc into the repository (#789) 2020-05-22 20:36:39 +09:00
spack feat(es/ast): Add raw to Str (#4071) 2022-03-22 07:54:08 +00:00
transform fix(es/module): Revert #7901 (#7906) 2023-09-01 14:24:50 +09:00
dynamic_tsx.mjs feat(node/swc): Enable tsx automatically based on the extension (#2230) 2021-09-14 10:47:53 +09:00
error_test.mjs fix(es): Resolve jsc.baseUrl for .swcrc specified by --config-file (#7801) 2023-08-14 16:33:17 +00:00
import_test.js Move node-swc into the repository (#789) 2020-05-22 20:36:39 +09:00
is_module_unknown_test.js feat(swc): Add IsModule (#2601) 2021-11-16 10:31:02 +00:00
minify_test.mjs fix(es/minifier): Parse a file as a module only if opts.module is true (#7943) 2023-09-13 05:55:34 +00:00
module_test.js fix(es/module): Do not determine module name for modules without exports in UMD (#7718) 2023-07-28 05:20:16 +00:00
paths_test.mjs chore: Publish v1.2.181 2022-05-10 04:52:51 +09:00
plugin_test.mjs fix(node-swc): Fix visitor (#1890) 2021-07-04 12:35:25 +00:00
preserve_comments.mjs feat(es/codegen): Emit comments in emit_module (#5132) 2022-07-12 15:23:24 +00:00
script_test.js Move node-swc into the repository (#789) 2020-05-22 20:36:39 +09:00