@vitejs/plugin-react-swc 3.4.0 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.cjs +1 -1
  2. package/index.mjs +1 -1
  3. package/package.json +2 -2
package/index.cjs CHANGED
@@ -146,7 +146,7 @@ RefreshRuntime.__hmr_import(import.meta.url).then((currentExports) => {
146
146
  };
147
147
  var transformWithOptions = async (id, code, target, options, reactConfig) => {
148
148
  const decorators = (options == null ? void 0 : options.tsDecorators) ?? false;
149
- const parser = id.endsWith(".tsx") ? { syntax: "typescript", tsx: true, decorators } : id.endsWith(".ts") ? { syntax: "typescript", tsx: false, decorators } : id.endsWith(".jsx") ? { syntax: "ecmascript", jsx: true } : id.endsWith(".mdx") ? (
149
+ const parser = id.endsWith(".tsx") ? { syntax: "typescript", tsx: true, decorators } : id.endsWith(".ts") || id.endsWith(".mts") ? { syntax: "typescript", tsx: false, decorators } : id.endsWith(".jsx") ? { syntax: "ecmascript", jsx: true } : id.endsWith(".mdx") ? (
150
150
  // JSX is required to trigger fast refresh transformations, even if MDX already transforms it
151
151
  { syntax: "ecmascript", jsx: true }
152
152
  ) : void 0;
package/index.mjs CHANGED
@@ -147,7 +147,7 @@ RefreshRuntime.__hmr_import(import.meta.url).then((currentExports) => {
147
147
  };
148
148
  var transformWithOptions = async (id, code, target, options, reactConfig) => {
149
149
  const decorators = (options == null ? void 0 : options.tsDecorators) ?? false;
150
- const parser = id.endsWith(".tsx") ? { syntax: "typescript", tsx: true, decorators } : id.endsWith(".ts") ? { syntax: "typescript", tsx: false, decorators } : id.endsWith(".jsx") ? { syntax: "ecmascript", jsx: true } : id.endsWith(".mdx") ? (
150
+ const parser = id.endsWith(".tsx") ? { syntax: "typescript", tsx: true, decorators } : id.endsWith(".ts") || id.endsWith(".mts") ? { syntax: "typescript", tsx: false, decorators } : id.endsWith(".jsx") ? { syntax: "ecmascript", jsx: true } : id.endsWith(".mdx") ? (
151
151
  // JSX is required to trigger fast refresh transformations, even if MDX already transforms it
152
152
  { syntax: "ecmascript", jsx: true }
153
153
  ) : void 0;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vitejs/plugin-react-swc",
3
3
  "description": "Speed up your Vite dev server with SWC",
4
- "version": "3.4.0",
4
+ "version": "3.4.1",
5
5
  "author": "Arnaud Barré (https://github.com/ArnaudBarre)",
6
6
  "license": "MIT",
7
7
  "repository": "github:vitejs/vite-plugin-react-swc",
@@ -28,6 +28,6 @@
28
28
  "vite": "^4"
29
29
  },
30
30
  "dependencies": {
31
- "@swc/core": "^1.3.85"
31
+ "@swc/core": "^1.3.95"
32
32
  }
33
33
  }