swc/node-swc
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
..
__tests__ fix(es/minifier): Parse a file as a module only if opts.module is true (#7943) 2023-09-13 05:55:34 +00:00
benches chore(es/minifier): Add full benchmark for .minify() (#4341) 2022-04-15 22:31:15 +00:00
e2e test(es/plugin): Enable E2E test again (#7236) 2023-04-10 07:01:56 +00:00
src refactor(es/types): Extract @swc/types as a small, reusable package (#7834) 2023-08-18 06:24:49 +00:00
tests fix(es/module): Don't create absolute paths for jsc.paths on Windows (#7892) 2023-08-30 10:11:34 +00:00
.gitignore Move node-swc into the repository (#789) 2020-05-22 20:36:39 +09:00
.npmignore Move node-swc into the repository (#789) 2020-05-22 20:36:39 +09:00
jest.config.js chore(ci): Skip plugin e2e tests for unsupported targets (#5203) 2022-07-14 16:38:54 +09:00