swc-project
swc
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
feat(es/minifier): Fine grained effect analysis of class
Austaras:main
2 hours ago
feat(es/minifier): Fine grained effect analysis of class
Austaras:main
2 hours ago
feat(es/minifier): Fine grained effect analysis of class
Austaras:main
3 hours ago
feat(es/minifier): Fine grained effect analysis of class
Austaras:main
3 hours ago
fix(flow): restore original TS module context behavior in non-flow mode
oblador:flow-strip-type-only-export
1 day ago
perf(ecma_parser): gate ts accessor signature backtracking
kdy1/oxc-parser-rewrite
1 day ago
feat(es): Add `jsc.preserveSymlinks` to `swc::Options` (#11813) ## Description Wires the `NodeImportResolver::with_config_preserving_symlinks` constructor (added in #11801) through to `swc::Options` as a new `jsc.preserveSymlinks` boolean config option. When enabled: - `ModuleConfig::get_resolver` skips the `base.canonicalize()` call on the input file, so the input path is left at its symlink location. - `build_resolver` constructs the `NodeImportResolver` via the new preserve-symlinks constructor, so rewritten module specifiers don't re-canonicalize target paths. - The `build_resolver` memoization key is extended with `preserve_symlinks` so the two modes don't share cached resolver instances. Default behaviour is unchanged — canonicalization still happens unless the flag is explicitly set. ## Motivation Monorepos that symlink shared source files (e.g. `shared/foo.ts` symlinked into `packages/app-a/src/foo.ts` and `packages/app-b/src/foo.ts`) break under the current behaviour: once any link is followed to the real path, relative imports inside `shared/` resolve against the real parent directory rather than the importing package, producing module-not-found errors. `resolve.symlinks: false` at the bundler level (rspack, webpack) is not enough if the downstream transformer re-canonicalizes. This PR is the upstream companion to web-infra-dev/rspack#13762, which exposes a `preserveSymlinks` option on `builtin:swc-loader` once this lands. ## Test `crates/swc/tests/preserve_symlinks.rs` (new) exercises the full `swc::Options` pipeline against a tempdir with the shape: ``` root/ src/index.ts // import "../server/source"; shared/source.ts // export const value = 1; server/source.ts // symlink -> ../shared/source.ts ``` It asserts that: - With `jsc.preserveSymlinks = false` (default): the rewritten specifier is `"../shared/source"` (canonicalized). - With `jsc.preserveSymlinks = true`: the rewritten specifier remains `"../server/source"` (symlink preserved). The existing low-level coverage in `crates/swc_ecma_transforms_module/tests/path_node.rs::symlink_paths_are_preserved_only_when_opted_in` is unchanged. ## Related issue: Closes #11584
main
1 day ago
Update cool-lanterns-preserve.md
perbergland:feat/preserve-symlinks
1 day ago
Latest Branches
CodSpeed Performance Gauge
0%
feat(es/minifier): Fine grained effect analysis of class
#11814
3 hours ago
ded02a2
Austaras:main
CodSpeed Performance Gauge
0%
Omit empty `export {}` when flow module has only type exports
#11809
1 day ago
366921b
oblador:flow-strip-type-only-export
CodSpeed Performance Gauge
0%
perf(ecma_parser): start oxc-style token payload rewrite
#11812
1 day ago
5439aaf
kdy1/oxc-parser-rewrite
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs