@vitejs/plugin-react 3.0.0-alpha.2 → 3.0.0-beta.0

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.
package/README.md CHANGED
@@ -14,7 +14,7 @@ import { defineConfig } from 'vite'
14
14
  import react from '@vitejs/plugin-react'
15
15
 
16
16
  export default defineConfig({
17
- plugins: [react()]
17
+ plugins: [react()],
18
18
  })
19
19
  ```
20
20
 
@@ -29,7 +29,7 @@ react({
29
29
  // Exclude storybook stories
30
30
  exclude: /\.stories\.(t|j)sx?$/,
31
31
  // Only .tsx files
32
- include: '**/*.tsx'
32
+ include: '**/*.tsx',
33
33
  })
34
34
  ```
35
35
 
@@ -39,7 +39,7 @@ By default, the plugin uses the [automatic JSX runtime](https://github.com/alloc
39
39
 
40
40
  ```js
41
41
  react({
42
- jsxRuntime: 'classic'
42
+ jsxRuntime: 'classic',
43
43
  })
44
44
  ```
45
45
 
@@ -69,9 +69,9 @@ If you are using ES syntax that are still in proposal status (e.g. class propert
69
69
  react({
70
70
  babel: {
71
71
  parserOpts: {
72
- plugins: ['decorators-legacy']
73
- }
74
- }
72
+ plugins: ['decorators-legacy'],
73
+ },
74
+ },
75
75
  })
76
76
  ```
77
77
 
package/dist/index.d.ts CHANGED
@@ -33,7 +33,7 @@ interface Options {
33
33
  ssr?: boolean;
34
34
  }) => BabelOptions);
35
35
  }
36
- declare type BabelOptions = Omit<TransformOptions, 'ast' | 'filename' | 'root' | 'sourceFileName' | 'sourceMaps' | 'inputSourceMap'>;
36
+ type BabelOptions = Omit<TransformOptions, 'ast' | 'filename' | 'root' | 'sourceFileName' | 'sourceMaps' | 'inputSourceMap'>;
37
37
  /**
38
38
  * The object type used by the `options` passed to plugins with
39
39
  * an `api.reactBabel` method.
@@ -46,8 +46,8 @@ interface ReactBabelOptions extends BabelOptions {
46
46
  plugins: Extract<ParserOptions['plugins'], any[]>;
47
47
  };
48
48
  }
49
- declare type ReactBabelHook = (babelConfig: ReactBabelOptions, context: ReactBabelHookContext, config: ResolvedConfig) => void;
50
- declare type ReactBabelHookContext = {
49
+ type ReactBabelHook = (babelConfig: ReactBabelOptions, context: ReactBabelHookContext, config: ResolvedConfig) => void;
50
+ type ReactBabelHookContext = {
51
51
  ssr: boolean;
52
52
  id: string;
53
53
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitejs/plugin-react",
3
- "version": "3.0.0-alpha.2",
3
+ "version": "3.0.0-beta.0",
4
4
  "license": "MIT",
5
5
  "author": "Evan You",
6
6
  "contributors": [
@@ -30,26 +30,21 @@
30
30
  },
31
31
  "repository": {
32
32
  "type": "git",
33
- "url": "git+https://github.com/vitejs/vite.git",
33
+ "url": "git+https://github.com/vitejs/vite-plugin-react.git",
34
34
  "directory": "packages/plugin-react"
35
35
  },
36
36
  "bugs": {
37
- "url": "https://github.com/vitejs/vite/issues"
37
+ "url": "https://github.com/vitejs/vite-plugin-react/issues"
38
38
  },
39
- "homepage": "https://github.com/vitejs/vite/tree/main/packages/plugin-react#readme",
39
+ "homepage": "https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react#readme",
40
40
  "dependencies": {
41
41
  "@babel/core": "^7.20.5",
42
- "@babel/plugin-transform-react-jsx": "^7.19.0",
43
- "@babel/plugin-transform-react-jsx-development": "^7.18.6",
44
42
  "@babel/plugin-transform-react-jsx-self": "^7.18.6",
45
43
  "@babel/plugin-transform-react-jsx-source": "^7.19.6",
46
- "magic-string": "^0.26.7",
44
+ "magic-string": "^0.27.0",
47
45
  "react-refresh": "^0.14.0"
48
46
  },
49
47
  "peerDependencies": {
50
- "vite": "^3.0.0"
51
- },
52
- "devDependencies": {
53
- "vite": "workspace:*"
48
+ "vite": "^4.0.0-alpha.0"
54
49
  }
55
50
  }