Skip to content

Commit

Permalink
Merge pull request #11 from 2fd/feat/upgrade-swc-core-0-91
Browse files Browse the repository at this point in the history
feat: upgrade swc_core to 0.91.0
  • Loading branch information
2fd authored Apr 25, 2024
2 parents d2972e1 + 017d0b0 commit 9d4d311
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ strip = "symbols"
[dependencies]
serde = { version = "1.0.197", features = ["derive"] }
serde_json = "1.0.115"
swc_core = { version = "0.90.30", features = ["ecma_plugin_transform"] }
swc_ecma_ast = "0.112.7"
swc_ecma_visit = "0.98.7"
swc_core = { version = "0.91.0", features = ["ecma_plugin_transform"] }
swc_ecma_ast = "0.113.0"
swc_ecma_visit = "0.99.0"
swc_plugin_macro = "0.9.16"

[dev-dependencies]
swc_atoms = "0.6.6"
swc_common = "0.33.22"
swc_ecma_parser = "0.143.13"
swc_ecma_transforms_base = "0.137.19"
swc_ecma_transforms_testing = "0.140.18"
swc_ecma_transforms_typescript = "0.188.18"
swc_ecma_utils = "0.127.17"
swc_ecma_parser = "0.144.0"
swc_ecma_transforms_base = "0.138.0"
swc_ecma_transforms_testing = "0.141.0"
swc_ecma_transforms_typescript = "0.189.0"
swc_ecma_utils = "0.128.0"
testing = "0.35.22"
tracing = { version="0.1", features = ["release_max_level_info"] }
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ SWC Plugin for allowImportingTsExtensions

If you are using SWC to transpile your TypeScript code, and your target is `es2016` or higher, you can use this plugin to import `.ts` files extensions (instead of `.js`), and it will be transpiled to `.js` files.

## Compatibility chart

| `@swc/core` | `@rspack/core` | `swc-plugin-allow-importing-ts-extensions` |
| ----------- | -------------- | ------------------------------------------ |
| `1.4.0` | `0.6.x` | `1.0.x` |
| `1.5.0` | | `1.1.x` |

## Usage

First, setup your `tsconfig.json` to allow importing `.ts` files extensions.
Expand Down Expand Up @@ -54,6 +61,6 @@ Then, add the plugin to your `.swcrc` file.
}
```

| option | type | default | description |
| ------------------------- | --------- | ------- | -------------------------------------------------------- |
| option | type | default | description |
| ------------------------- | --------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `preserveImportExtension` | `boolean` | `false` | If `true` all imports with extension `.mts` and `.cts` with be map to `.mjs` and `.cjs` respectively, otherwise it will map to `.js` |

0 comments on commit 9d4d311

Please sign in to comment.