Commit 670d0ea
committed
remove swc experimental options
This removes support for keeping import assertions, which were broken in
swc at some point, and unconditionally transpiled into import
attributes. (Ie, `import/with` instead of `import/assert`.)
No version of node supports import attributes with this syntax yet, so
anyone using swc to import json in ESM is out of luck no matter what.
And swc 1.3.83 broke the option that ts-node was using. The position of
the swc project is that experimental features are not supported, and may
change in patch versions without warning, making them unsafe to rely on
(as evidenced here, and the reason why this behavior changed
unexpectedly in the first place).
Better to just not use experimental swc features, and let it remove
import assertions rather than transpile them into something that node
can't run.
Fix: #20561 parent 47d4f45 commit 670d0ea
2 files changed
+0
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | 123 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | 238 | | |
242 | 239 | | |
243 | 240 | | |
| |||
0 commit comments