├── examples └── vite-swc-react │ ├── src │ ├── vite-env.d.ts │ ├── Foo.tsx │ ├── main.tsx │ ├── index.css │ ├── App.css │ ├── App.tsx │ ├── favicon.svg │ └── logo.svg │ ├── .gitignore │ ├── vite.config.ts │ ├── index.html │ ├── tsconfig.json │ ├── package.json │ └── pnpm-lock.yaml ├── .prettierrc ├── pnpm-workspace.yaml ├── jest.config.js ├── package.json ├── packages ├── swc │ ├── src │ │ └── index.ts │ ├── package.json │ └── tsconfig.json ├── react │ ├── package.json │ ├── README.md │ ├── src │ │ ├── react-refresh-helper.ts │ │ ├── index.ts │ │ └── ExportNameCollector.ts │ ├── __tests__ │ │ └── ExportNameCollector.ts │ └── tsconfig.json └── tsconfig.base.json ├── LICENSE ├── .gitignore └── README.md /examples/vite-swc-react/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "singleQuote": true, 4 | "trailingComma": "all" 5 | } -------------------------------------------------------------------------------- /examples/vite-swc-react/.gitignore: -------------------------------------------------------------------------------- 1 | yarn.lock 2 | node_modules 3 | .DS_Store 4 | dist 5 | dist-ssr 6 | *.local 7 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | # all packages in subdirs of packages/ and components/ 3 | - 'packages/**' 4 | - 'examples/**' -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | // jest.config.js 2 | module.exports = { 3 | transform: { 4 | '^.+\\.(t|j)sx?$': ['@swc-node/jest'], 5 | }, 6 | } -------------------------------------------------------------------------------- /examples/vite-swc-react/src/Foo.tsx: -------------------------------------------------------------------------------- 1 | export const Foo = () =>
jell2o111x
2 | export default Foo 3 | export type TFoo = 'Foo' 4 | export interface IFoo { 5 | 6 | } -------------------------------------------------------------------------------- /examples/vite-swc-react/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import swcReact from 'vite-plugin-swc-react' 3 | import inspect from 'vite-plugin-inspect' 4 | 5 | export default defineConfig({ 6 | plugins: [ 7 | swcReact(), 8 | inspect(), 9 | ], 10 | }) 11 | -------------------------------------------------------------------------------- /examples/vite-swc-react/src/main.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom' 3 | import './index.css' 4 | import App from './App' 5 | 6 | import('react').then(console.log) 7 | ReactDOM.render( 8 | 9 |
bar
10 | 11 |
, 12 | document.getElementById('root') 13 | ) 14 | -------------------------------------------------------------------------------- /examples/vite-swc-react/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/vite-swc-react/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vite-on-swc", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "private": true, 6 | "repository": "https://github.com/iheyunfei/vite-on-swc", 7 | "author": "Yunfei He ", 8 | "license": "MIT", 9 | "scripts": { 10 | "test": "jest" 11 | }, 12 | "devDependencies": { 13 | "@swc-node/jest": "^1.3.3", 14 | "@types/jest": "^27.0.2", 15 | "jest": "^27.2.5", 16 | "rimraf": "^3.0.2", 17 | "tsup": "^5.11.0" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /examples/vite-swc-react/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "useDefineForClassFields": true, 5 | "lib": ["DOM", "DOM.Iterable", "ESNext"], 6 | "allowJs": false, 7 | "skipLibCheck": false, 8 | "esModuleInterop": false, 9 | "allowSyntheticDefaultImports": true, 10 | "strict": true, 11 | "forceConsistentCasingInFileNames": true, 12 | "module": "ESNext", 13 | "moduleResolution": "Node", 14 | "resolveJsonModule": true, 15 | "isolatedModules": true, 16 | "noEmit": true, 17 | "jsx": "react-jsx" 18 | }, 19 | "include": ["./src"] 20 | } 21 | -------------------------------------------------------------------------------- /examples/vite-swc-react/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vite-swc-react", 3 | "version": "0.0.0", 4 | "private": "true", 5 | "scripts": { 6 | "dev": "vite", 7 | "build": "tsc && vite build", 8 | "serve": "vite preview" 9 | }, 10 | "dependencies": { 11 | "react": "^17.0.0", 12 | "react-dom": "^17.0.0" 13 | }, 14 | "devDependencies": { 15 | "@types/react": "^17.0.0", 16 | "@types/react-dom": "^17.0.0", 17 | "@vitejs/plugin-react": "^1.0.0", 18 | "typescript": "^4.3.2", 19 | "vite": "^2.6.4", 20 | "vite-plugin-inspect": "^0.3.11", 21 | "vite-plugin-swc-react": "workspace:*" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/swc/src/index.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Options as SWCOptions, 3 | transform, 4 | } from '@swc/core' 5 | import { PluginOption } from 'vite' 6 | import merge from 'lodash.merge' 7 | 8 | 9 | export default function swc( 10 | options: { 11 | swcOptions?: SWCOptions 12 | } = {}, 13 | ): PluginOption[] { 14 | const { 15 | swcOptions = {}, 16 | } = options 17 | return [ 18 | { 19 | name: 'vite-plugin-swc', 20 | enforce: 'pre', 21 | async transform(code, id) { 22 | if (/\.(js|[tj]sx?)$/.test(id)) { 23 | const transformed = await transform(code, merge({}, swcOptions)) 24 | return transformed 25 | } 26 | }, 27 | }, 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /examples/vite-swc-react/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | 40 | button { 41 | font-size: calc(10px + 2vmin); 42 | } 43 | -------------------------------------------------------------------------------- /packages/swc/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vite-plugin-swc", 3 | "version": "0.0.2", 4 | "description": "", 5 | "keywords": ["vite", "swc"], 6 | "author": "Yunfei He ", 7 | "main": "dist/index.js", 8 | "files": [ 9 | "dist/*" 10 | ], 11 | "scripts": { 12 | "prepack": "pnpm build", 13 | "build": "pnpm tsc -b", 14 | "dev": "pnpm tsc -b --watch", 15 | "test": "echo \"Error: no test specified\" && exit 1" 16 | }, 17 | "license": "ISC", 18 | "dependencies": { 19 | "@swc/core": "^1.2.98", 20 | "lodash.merge": "^4.6.2" 21 | }, 22 | "peerDependencies": { 23 | "@swc/core": "^1.2.98", 24 | "vite": "^2.6.7" 25 | }, 26 | "devDependencies": { 27 | "@swc/core": "^1.2.98", 28 | "@types/lodash.merge": "^4.6.6", 29 | "typescript": "^4.4.4", 30 | "vite": "^2.6.7" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Yunfei He 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /packages/react/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vite-plugin-swc-react", 3 | "version": "0.1.12", 4 | "keywords": [ 5 | "vite", 6 | "react", 7 | "swc", 8 | "vite react" 9 | ], 10 | "author": "Yunfei He ", 11 | "description": "", 12 | "main": "dist/index.js", 13 | "module": "dist/index.mjs", 14 | "exports": { 15 | "import": "./dist/index.mjs", 16 | "require": "./dist/index.js" 17 | }, 18 | "files": [ 19 | "dist/*" 20 | ], 21 | "scripts": { 22 | "prepack": "pnpm build", 23 | "dev": "pnpm build -- --watch", 24 | "clean": "rimraf dist", 25 | "build": "pnpm clean && tsup src/index.ts --dts --format cjs,esm --no-splitting", 26 | "test": "echo \"Error: no test specified\" && exit 1" 27 | }, 28 | "license": "ISC", 29 | "dependencies": { 30 | "@swc/core": "^1.2.98", 31 | "lodash.merge": "^4.6.2", 32 | "react-refresh": "^0.10.0" 33 | }, 34 | "peerDependencies": { 35 | "@swc/core": "^1.2.98", 36 | "vite": "^2.6.7" 37 | }, 38 | "devDependencies": { 39 | "@swc/core": "^1.2.98", 40 | "@types/lodash.merge": "^4.6.6", 41 | "@types/node": "^16.11.0", 42 | "typescript": "^4.4.4", 43 | "vite": "^2.6.7" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /examples/vite-swc-react/src/App.tsx: -------------------------------------------------------------------------------- 1 | import { useState } from 'react' 2 | import logo from './logo.svg' 3 | import './App.css' 4 | import * as Foo from './Foo' 5 | 6 | function App() { 7 | const [count, setCount] = useState(2) 8 | 9 | return ( 10 |
11 | 12 |
13 | logo 14 |

Hello Vite + React

15 |

16 | 19 |

20 |

21 | Edit App.tsx and save to test HMR updates. 22 |

23 |

24 | 30 | Learn React 31 | 32 | {' | '} 33 | 39 | Vite Docs 40 | 41 |

42 |
43 |
44 | ) 45 | } 46 | 47 | export default App 48 | -------------------------------------------------------------------------------- /examples/vite-swc-react/src/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | 78 | # Next.js build output 79 | .next 80 | 81 | # Nuxt.js build / generate output 82 | .nuxt 83 | dist 84 | 85 | # Gatsby files 86 | .cache/ 87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 88 | # https://nextjs.org/blog/next-9-1#public-directory-support 89 | # public 90 | 91 | # vuepress build output 92 | .vuepress/dist 93 | 94 | # Serverless directories 95 | .serverless/ 96 | 97 | # FuseBox cache 98 | .fusebox/ 99 | 100 | # DynamoDB Local files 101 | .dynamodb/ 102 | 103 | # TernJS port file 104 | .tern-port 105 | -------------------------------------------------------------------------------- /examples/vite-swc-react/src/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/react/README.md: -------------------------------------------------------------------------------- 1 | # vite-plugin-swc-react 2 | 3 | # features 4 | 5 | - [Speedy Compiling in SWC](https://swc.rs/docs/configuring-swc) 6 | - HMR Support in React Refresh 7 | - [New JSX Transform](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html) 8 | - [Polyfill and Transpiler in SWC](https://swc.rs/docs/preset-env) 9 | 10 | # Using template 11 | 12 | ``` 13 | npx degit iheyunfei/vite-swc-react-ts my-project 14 | // or using javascript template 15 | npx degit iheyunfei/vite-swc-react my-project 16 | 17 | cd my-project 18 | 19 | npm install 20 | npm run dev 21 | ``` 22 | 23 | # install 24 | 25 | ``` 26 | yarn add -D vite-plugin-swc-react 27 | // or 28 | npm install -D vite-plugin-swc-react 29 | ``` 30 | 31 | # Usage 32 | 33 | ```ts 34 | import { defineConfig } from 'vite' 35 | import swcReact from 'vite-plugin-swc-react' 36 | 37 | export default defineConfig({ 38 | plugins: [swcReact()], 39 | }) 40 | ``` 41 | 42 | ## Polyfill and Transpiler 43 | 44 | To enable polyfill, you would need to 45 | 46 | - install `browserlist` as a devDependency 47 | - install `core-js` as a dependency 48 | - pass options like 49 | 50 | ```ts 51 | import { defineConfig } from 'vite' 52 | import swcReact from 'vite-plugin-swc-react' 53 | 54 | export default defineConfig({ 55 | plugins: [ 56 | swcReact({ 57 | swcOptions: { 58 | env: { 59 | // https://vitejs.dev/guide/build.html#browser-compatibility 60 | targets: 'defaults and supports es6-module and supports es6-module-dynamic-import, not opera > 0, not samsung > 0, not and_qq > 0', 61 | mode: 'usage', 62 | coreJs: 3, 63 | } 64 | } 65 | }), 66 | ], 67 | }) 68 | 69 | ``` 70 | 71 | ### ES5 72 | 73 | If your target browser only supports ES5, you may want to checkout [`@vitejs/plugin-legacy`](https://github.com/vitejs/vite/tree/main/packages/plugin-legacy). 74 | 75 | ## disable HMR 76 | 77 | ```ts 78 | import { defineConfig } from 'vite' 79 | import swcReact from 'vite-plugin-swc-react' 80 | 81 | export default defineConfig({ 82 | plugins: [ 83 | swcReact({ 84 | reactFresh: false, 85 | }), 86 | ], 87 | }) 88 | ``` 89 | 90 | ## classic JSX runtime 91 | 92 | ```ts 93 | import { defineConfig } from 'vite' 94 | import swcReact from 'vite-plugin-swc-react' 95 | 96 | export default defineConfig({ 97 | plugins: [ 98 | swcReact({ 99 | swcOptions: { 100 | jsc: { 101 | transform: { 102 | react: { 103 | runtime: 'classic', 104 | }, 105 | }, 106 | }, 107 | }, 108 | }), 109 | ], 110 | }) 111 | ``` 112 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Plugins 2 | 3 | ## [vite-plugin-swc-react](./packages/react) 4 | 5 | ### features 6 | 7 | - [Speedy Compiling in SWC](https://swc.rs/docs/configuring-swc) 8 | - HMR Support in React Refresh 9 | - [New JSX Transform](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html) 10 | - [Polyfill and Transpiler in SWC](https://swc.rs/docs/preset-env) 11 | 12 | ### Using template 13 | 14 | ``` 15 | npx degit iheyunfei/vite-swc-react-ts my-project 16 | // or using javascript template 17 | npx degit iheyunfei/vite-swc-react my-project 18 | 19 | cd my-project 20 | 21 | npm install 22 | npm run dev 23 | ``` 24 | 25 | ### install 26 | 27 | ``` 28 | yarn add -D vite-plugin-swc-react 29 | // or 30 | npm install -D vite-plugin-swc-react 31 | ``` 32 | 33 | ### Usage 34 | 35 | ```ts 36 | import { defineConfig } from 'vite' 37 | import swcReact from 'vite-plugin-swc-react' 38 | 39 | export default defineConfig({ 40 | plugins: [swcReact()], 41 | }) 42 | ``` 43 | 44 | #### Polyfill and Transpiler 45 | 46 | To enable polyfill, you would need to 47 | 48 | - install `browserlist` as a devDependency 49 | - install `core-js` as a dependency 50 | - pass options like 51 | 52 | ```ts 53 | import { defineConfig } from 'vite' 54 | import swcReact from 'vite-plugin-swc-react' 55 | 56 | export default defineConfig({ 57 | plugins: [ 58 | swcReact({ 59 | swcOptions: { 60 | env: { 61 | // https://vitejs.dev/guide/build.html#browser-compatibility 62 | targets: 'defaults and supports es6-module and supports es6-module-dynamic-import, not opera > 0, not samsung > 0, not and_qq > 0', 63 | mode: 'usage', 64 | coreJs: 3, 65 | } 66 | } 67 | }), 68 | ], 69 | }) 70 | 71 | ``` 72 | 73 | ##### ES5 74 | 75 | If your target browser only supports ES5, you may want to checkout [`@vitejs/plugin-legacy`](https://github.com/vitejs/vite/tree/main/packages/plugin-legacy). 76 | 77 | #### disable HMR 78 | 79 | ```ts 80 | import { defineConfig } from 'vite' 81 | import swcReact from 'vite-plugin-swc-react' 82 | 83 | export default defineConfig({ 84 | plugins: [ 85 | swcReact({ 86 | reactFresh: false, 87 | }), 88 | ], 89 | }) 90 | ``` 91 | 92 | #### classic JSX runtime 93 | 94 | ```ts 95 | import { defineConfig } from 'vite' 96 | import swcReact from 'vite-plugin-swc-react' 97 | 98 | export default defineConfig({ 99 | plugins: [ 100 | swcReact({ 101 | swcOptions: { 102 | jsc: { 103 | transform: { 104 | react: { 105 | runtime: 'classic', 106 | }, 107 | }, 108 | }, 109 | }, 110 | }), 111 | ], 112 | }) 113 | ``` 114 | -------------------------------------------------------------------------------- /packages/react/src/react-refresh-helper.ts: -------------------------------------------------------------------------------- 1 | // The code are inspired and copied from https://github.com/facebook/react/issues/16604 and https://github.com/vitejs/vite/tree/main/packages/plugin-react 2 | 3 | import fs from 'fs' 4 | import ExportNameCollector from './ExportNameCollector' 5 | 6 | const runtimeFilePath = require.resolve( 7 | 'react-refresh/cjs/react-refresh-runtime.development.js', 8 | ) 9 | 10 | const reactRefreshExports = ` 11 | (function (){ 12 | window.$react_refresh_exports$ = null 13 | let exports = {} 14 | return () => { 15 | if (window.$react_refresh_exports$) return window.$react_refresh_exports$ 16 | ${fs 17 | .readFileSync(runtimeFilePath, 'utf-8') 18 | .replace('process.env.NODE_ENV', JSON.stringify('development'))} 19 | exports.performReactRefresh = (function debounce(fn) { 20 | let handle 21 | return () => { 22 | cancelAnimationFrame(handle) 23 | handle = requestAnimationFrame(fn) 24 | } 25 | }(exports.performReactRefresh)) 26 | window.$react_refresh_exports$ = exports 27 | return exports 28 | } 29 | }())() 30 | ` 31 | 32 | export const reactRefreshRuntimeCode = ` 33 | if (process.env.NODE_ENV !== 'production' && typeof window !== 'undefined') { 34 | const runtime = ${reactRefreshExports}; 35 | runtime.injectIntoGlobalHook(window); 36 | window.$RefreshReg$ = () => {}; 37 | window.$RefreshSig$ = () => type => type; 38 | } 39 | `.replace('process.env.NODE_ENV', JSON.stringify('development')) 40 | 41 | export const addReactFreshWrapper = ( 42 | id: string, 43 | code: string, 44 | collector: ExportNameCollector, 45 | ) => { 46 | let updater: string 47 | if ( 48 | collector.isAbsolutelyNotReactRefreshBoundary || 49 | collector.exportedNames.size === 0 50 | ) { 51 | updater = '' 52 | } else { 53 | updater = ` 54 | if (${[...collector.exportedNames.values()] 55 | // .map((name) => `typeof ${name} === 'function'`) 56 | .map((name) => `RefreshRuntime.isLikelyComponentType(${name})`) 57 | .join('&&')}) { 58 | import.meta.hot.accept() 59 | } else { 60 | // For now, calling import.meta.hot.invalidate() simply reloads the page. https://vitejs.dev/guide/api-hmr.html#hot-dispose-cb 61 | // TODO: We should ask user before reloading the page. 62 | import.meta.hot.invalidate() 63 | } 64 | ` 65 | } 66 | 67 | return ` 68 | let prevRefreshReg; 69 | let prevRefreshSig; 70 | const RefreshRuntime = window.$react_refresh_exports$; 71 | 72 | if (import.meta.hot) { 73 | prevRefreshReg = window.$RefreshReg$; 74 | prevRefreshSig = window.$RefreshSig$; 75 | window.$RefreshReg$ = (type, id) => { 76 | const fullId = ${JSON.stringify(id)} + ' ' + id; 77 | RefreshRuntime.register(type, fullId); 78 | } 79 | window.$RefreshSig$ = RefreshRuntime.createSignatureFunctionForTransform; 80 | } 81 | 82 | ${code} 83 | 84 | if (import.meta.hot) { 85 | window.$RefreshReg$ = prevRefreshReg; 86 | window.$RefreshSig$ = prevRefreshSig; 87 | ${updater} 88 | RefreshRuntime.performReactRefresh() 89 | }` 90 | } 91 | -------------------------------------------------------------------------------- /packages/react/src/index.ts: -------------------------------------------------------------------------------- 1 | import * as swcCore from '@swc/core' 2 | 3 | import { 4 | Options as SWCOptions, 5 | } from '@swc/core' 6 | import { PluginOption } from 'vite' 7 | import merge from 'lodash.merge' 8 | import { 9 | addReactFreshWrapper, 10 | reactRefreshRuntimeCode, 11 | } from './react-refresh-helper' 12 | import ExportNameCollector from './ExportNameCollector' 13 | 14 | export default function swcReact( 15 | options: { 16 | /** 17 | * @default true 18 | */ 19 | reactFresh?: boolean 20 | /** 21 | * @default 'automatic' 22 | */ 23 | jsxRuntime?: 'classic' | 'automatic' 24 | /** 25 | * See https://swc.rs/docs/configuring-swc 26 | */ 27 | swcOptions?: SWCOptions, 28 | /** 29 | * ```ts 30 | * import * as yourOwnSWC from '@swc/core' 31 | * swcReact({ unsafe_injectSWC: yourOwnSWC }) 32 | * ``` 33 | */ 34 | unsafe_injectSWC?: any, 35 | } = {}, 36 | ): PluginOption[] { 37 | const swc: typeof swcCore = options?.unsafe_injectSWC ?? swcCore; 38 | const { 39 | reactFresh = true, 40 | swcOptions = {}, 41 | jsxRuntime = 'automatic', 42 | } = options 43 | 44 | let isDevelopment = false 45 | 46 | const ctx = { 47 | get isEnableReactRefresh() { 48 | return isDevelopment && reactFresh 49 | }, 50 | } 51 | 52 | return [ 53 | { 54 | name: 'vite-plugin-swc-react', 55 | enforce: 'pre', 56 | config(config, env) { 57 | isDevelopment = env.mode === 'development' 58 | 59 | // Disable esbuild for transforming 60 | config.esbuild = false 61 | }, 62 | transformIndexHtml() { 63 | if (ctx.isEnableReactRefresh) { 64 | // Inject react refresh runtime 65 | return [ 66 | { 67 | tag: 'script', 68 | attrs: { type: 'module' }, 69 | children: reactRefreshRuntimeCode, 70 | }, 71 | ] 72 | } 73 | }, 74 | async transform(code, id) { 75 | if (!id.includes('node_modules') && /\.(js|mjs|jsx|ts|tsx)$/.test(id)) { 76 | const isTS = /\.(ts|tsx)$/.test(id) 77 | const is_SX = !id.endsWith('.ts') 78 | 79 | const collector = 80 | isDevelopment && is_SX ? new ExportNameCollector() : null 81 | 82 | const options: SWCOptions = { 83 | ...(collector 84 | ? { 85 | plugin: swc.plugins([(p) => collector.visitProgram(p)]), 86 | } 87 | : null), 88 | filename: id, 89 | jsc: { 90 | target: 'es2021', 91 | parser: { 92 | syntax: isTS ? 'typescript' : 'ecmascript', 93 | [isTS ? 'tsx' : 'jsx']: is_SX, 94 | }, 95 | transform: { 96 | react: { 97 | development: isDevelopment, 98 | runtime: jsxRuntime, 99 | refresh: ctx.isEnableReactRefresh, 100 | }, 101 | }, 102 | }, 103 | } 104 | 105 | const resolveSWCOptions = merge(options, swcOptions) 106 | 107 | const transformed = await swc.transform(code, resolveSWCOptions) 108 | 109 | return { 110 | ...transformed, 111 | code: 112 | isDevelopment && reactFresh && collector 113 | ? addReactFreshWrapper( 114 | id, 115 | transformed.code, 116 | collector 117 | ) 118 | : transformed.code, 119 | } 120 | } 121 | }, 122 | }, 123 | ] 124 | } -------------------------------------------------------------------------------- /packages/react/__tests__/ExportNameCollector.ts: -------------------------------------------------------------------------------- 1 | import * as swc from '@swc/core' 2 | import ExportNameCollector from '../src/ExportNameCollector' 3 | 4 | describe('ReactRefreshBoundaryCollector', () => { 5 | const cases = [ 6 | { 7 | code: `export default Foo;`, 8 | isAbsolutelyNotReactRefreshBoundary: false, 9 | }, 10 | { 11 | code: `export default foo;`, 12 | isAbsolutelyNotReactRefreshBoundary: true, 13 | }, 14 | { 15 | code: `export default memo(Foo);`, 16 | isAbsolutelyNotReactRefreshBoundary: false, 17 | }, 18 | { 19 | code: `export default memo(foo);`, 20 | isAbsolutelyNotReactRefreshBoundary: true, 21 | }, 22 | // export default [function / class] ... 23 | { 24 | code: `export default function Foo() {};`, 25 | isAbsolutelyNotReactRefreshBoundary: false, 26 | }, 27 | { 28 | code: `export default class Foo {}`, 29 | isAbsolutelyNotReactRefreshBoundary: true, 30 | }, 31 | { 32 | code: `export default function foo() {};`, 33 | isAbsolutelyNotReactRefreshBoundary: true, 34 | }, 35 | { 36 | code: `export default class foo {}`, 37 | isAbsolutelyNotReactRefreshBoundary: true, 38 | }, 39 | // export 40 | { 41 | code: `export { Foo }`, 42 | isAbsolutelyNotReactRefreshBoundary: false, 43 | }, 44 | { 45 | code: `export { foo }`, 46 | isAbsolutelyNotReactRefreshBoundary: true, 47 | }, 48 | { 49 | code: `export { Foo, baz }`, 50 | isAbsolutelyNotReactRefreshBoundary: true, 51 | }, 52 | 53 | // export 54 | { 55 | code: `export * as Foo from './foo.js'`, 56 | isAbsolutelyNotReactRefreshBoundary: true, 57 | }, 58 | { 59 | code: `export { Foo } from './foo.js'`, 60 | isAbsolutelyNotReactRefreshBoundary: false, 61 | }, 62 | { 63 | code: `export { Foo as foo } from './foo.js'`, 64 | isAbsolutelyNotReactRefreshBoundary: true, 65 | }, 66 | { 67 | code: `export { foo as Foo } from './foo.js'`, 68 | isAbsolutelyNotReactRefreshBoundary: false, 69 | }, 70 | { 71 | code: `export { foo } from './foo.js'`, 72 | isAbsolutelyNotReactRefreshBoundary: true, 73 | }, 74 | { 75 | code: `export { Foo, baz } from './foo.js'`, 76 | isAbsolutelyNotReactRefreshBoundary: true, 77 | }, 78 | { 79 | code: `export { Foo as default }`, 80 | isAbsolutelyNotReactRefreshBoundary: false, 81 | }, 82 | { 83 | code: `export { foo as default }`, 84 | isAbsolutelyNotReactRefreshBoundary: true, 85 | }, 86 | { 87 | code: `export { default as Foo }`, 88 | isAbsolutelyNotReactRefreshBoundary: false, 89 | }, 90 | { 91 | code: `export { default as foo }`, 92 | isAbsolutelyNotReactRefreshBoundary: true, 93 | }, 94 | { 95 | code: `export function Foo() {}`, 96 | isAbsolutelyNotReactRefreshBoundary: false, 97 | }, 98 | { 99 | code: `export function foo() {}`, 100 | isAbsolutelyNotReactRefreshBoundary: true, 101 | }, 102 | { 103 | code: `export class Foo {}`, 104 | isAbsolutelyNotReactRefreshBoundary: true, 105 | }, 106 | { 107 | code: `export class foo {}`, 108 | isAbsolutelyNotReactRefreshBoundary: true, 109 | }, 110 | ] 111 | 112 | cases.forEach((aCase) => { 113 | test(`${aCase.code.slice(0, 30)} should be ${aCase.isAbsolutelyNotReactRefreshBoundary}`, () => { 114 | const c = new ExportNameCollector(); 115 | swc.transformSync( 116 | `${aCase.code}`, 117 | { 118 | jsc: { 119 | parser: { 120 | syntax: 'typescript', 121 | tsx: true, 122 | }, 123 | }, 124 | plugin: swc.plugins([(p) => c.visitProgram(p)]), 125 | }, 126 | ) 127 | expect(c.isAbsolutelyNotReactRefreshBoundary).toBe(aCase.isAbsolutelyNotReactRefreshBoundary) 128 | }) 129 | }) 130 | }) 131 | -------------------------------------------------------------------------------- /packages/react/src/ExportNameCollector.ts: -------------------------------------------------------------------------------- 1 | import { 2 | CallExpression, 3 | ExportDeclaration, 4 | ExportDefaultDeclaration, 5 | ExportDefaultExpression, 6 | ExportNamedDeclaration, 7 | ModuleDeclaration, 8 | TsType, 9 | } from '@swc/core' 10 | import Visitor from '@swc/core/Visitor' 11 | 12 | function isComponentLikeName(name: string): boolean { 13 | return typeof name === 'string' && name[0] >= 'A' && name[0] <= 'Z' 14 | } 15 | 16 | function neverCheck(foo: never): never { 17 | throw new Error(`expected never got ${foo}`) 18 | } 19 | 20 | export default class ExportNameCollector extends Visitor { 21 | exportedNames = new Set() 22 | isAbsolutelyNotReactRefreshBoundary = false 23 | 24 | visitTsType(n: TsType): TsType { 25 | return n 26 | } 27 | 28 | addName(name: string) { 29 | if (isComponentLikeName(name)) { 30 | this.exportedNames.add(name) 31 | } else { 32 | this.isAbsolutelyNotReactRefreshBoundary = true 33 | } 34 | } 35 | 36 | handleExportDefaultExpression(node: ExportDefaultExpression) { 37 | const { expression: exp } = node 38 | if (exp.type === 'Identifier') { 39 | // export default Foo 40 | this.addName(exp.value) 41 | } else if (exp.type === 'CallExpression') { 42 | // export default memo(Component) 43 | const isMemoFn = 44 | exp.callee.type === 'Identifier' && exp.callee.value === 'memo' 45 | 46 | const componentName = 47 | exp.arguments[0] && exp.arguments[0].expression.type === 'Identifier' 48 | ? exp.arguments[0].expression.value 49 | : null 50 | if (isMemoFn && componentName) { 51 | this.addName(componentName) 52 | } else { 53 | this.isAbsolutelyNotReactRefreshBoundary = true 54 | } 55 | } else { 56 | this.isAbsolutelyNotReactRefreshBoundary = true 57 | } 58 | } 59 | 60 | handleExportDeclaration(node: ExportDeclaration) { 61 | // export function Foo() {} 62 | // export const Foo = () => {} 63 | // export var a = 1; 64 | const { declaration } = node 65 | const { type } = declaration 66 | if ( 67 | type === 'TsInterfaceDeclaration' || 68 | type === 'TsModuleDeclaration' || 69 | type === 'TsTypeAliasDeclaration' 70 | ) { 71 | // noop 72 | } else if (type === 'TsEnumDeclaration' || type === 'ClassDeclaration') { 73 | this.isAbsolutelyNotReactRefreshBoundary = true 74 | } else if (type === 'FunctionDeclaration') { 75 | this.addName(declaration.identifier.value) 76 | } else if (type === 'VariableDeclaration') { 77 | // TODO: all names 78 | declaration.declarations 79 | .flatMap((declarator) => 80 | declarator.id.type === 'Identifier' ? [declarator.id.value] : [], 81 | ) 82 | .forEach((name) => this.addName(name)) 83 | } else { 84 | neverCheck(type) 85 | } 86 | } 87 | handleExportDefaultDeclaration(moduleDecl: ExportDefaultDeclaration) { 88 | // export default function Foo() {} 89 | // export default class Foo {} 90 | const { decl } = moduleDecl 91 | if (decl.type === 'FunctionExpression') { 92 | this.addName(decl.identifier.value) 93 | } else if (decl.type === 'ClassExpression') { 94 | this.isAbsolutelyNotReactRefreshBoundary = true 95 | } 96 | } 97 | handleExportNamedDeclaration(moduleDecl: ExportNamedDeclaration) { 98 | // TODO: should we consider re-exported components valid? 99 | for (const s of moduleDecl.specifiers) { 100 | let exportName: string 101 | if (s.type === 'ExportNamespaceSpecifier') { 102 | // export * as name from '...' 103 | this.isAbsolutelyNotReactRefreshBoundary = true 104 | break 105 | } else if (s.type == 'ExportDefaultSpecifier') { 106 | // export name from '...' 107 | exportName = s.exported.value 108 | } else { 109 | exportName = s.exported?.value ?? s.orig.value 110 | if (exportName === 'default') { 111 | exportName = s.orig.value 112 | } 113 | } 114 | this.addName(exportName) 115 | } 116 | } 117 | 118 | visitModuleDeclaration(moduleDecl: ModuleDeclaration): ModuleDeclaration { 119 | if (this.isAbsolutelyNotReactRefreshBoundary) { 120 | return moduleDecl 121 | } 122 | if ( 123 | moduleDecl.type === 'ImportDeclaration' || 124 | moduleDecl.type === 'TsExportAssignment' || 125 | moduleDecl.type === 'TsImportEqualsDeclaration' || 126 | moduleDecl.type === 'TsNamespaceExportDeclaration' 127 | ) { 128 | // We don't care about these nodes 129 | } else if (moduleDecl.type === 'ExportAllDeclaration') { 130 | // export * from './foo' 131 | this.isAbsolutelyNotReactRefreshBoundary = true 132 | } else if (moduleDecl.type === 'ExportDefaultExpression') { 133 | this.handleExportDefaultExpression(moduleDecl) 134 | } else if (moduleDecl.type === 'ExportDeclaration') { 135 | this.handleExportDeclaration(moduleDecl) 136 | } else if (moduleDecl.type === 'ExportDefaultDeclaration') { 137 | this.handleExportDefaultDeclaration(moduleDecl) 138 | } else if (moduleDecl.type === 'ExportNamedDeclaration') { 139 | this.handleExportNamedDeclaration(moduleDecl) 140 | } 141 | return moduleDecl 142 | } 143 | } -------------------------------------------------------------------------------- /packages/tsconfig.base.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Visit https://aka.ms/tsconfig.json to read more about this file */ 4 | 5 | /* Projects */ 6 | "incremental": true, /* Enable incremental compilation */ 7 | // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ 8 | // "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */ 9 | // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */ 10 | // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ 11 | // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ 12 | 13 | /* Language and Environment */ 14 | "target": "ES2015", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ 15 | // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ 16 | // "jsx": "preserve", /* Specify what JSX code is generated. */ 17 | // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ 18 | // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ 19 | // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */ 20 | // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ 21 | // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */ 22 | // "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */ 23 | // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ 24 | // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ 25 | 26 | /* Modules */ 27 | "module": "commonjs", /* Specify what module code is generated. */ 28 | // "rootDir": "./", /* Specify the root folder within your source files. */ 29 | // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ 30 | // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ 31 | // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ 32 | // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ 33 | // "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */ 34 | // "types": [], /* Specify type package names to be included without being referenced in a source file. */ 35 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 36 | // "resolveJsonModule": true, /* Enable importing .json files */ 37 | // "noResolve": true, /* Disallow `import`s, `require`s or ``s from expanding the number of files TypeScript should add to a project. */ 38 | 39 | /* JavaScript Support */ 40 | // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ 41 | // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ 42 | // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ 43 | 44 | /* Emit */ 45 | // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ 46 | // "declarationMap": true, /* Create sourcemaps for d.ts files. */ 47 | // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ 48 | // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ 49 | // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */ 50 | // "outDir": "./", /* Specify an output folder for all emitted files. */ 51 | // "removeComments": true, /* Disable emitting comments. */ 52 | // "noEmit": true, /* Disable emitting files from a compilation. */ 53 | // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ 54 | // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */ 55 | // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ 56 | // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ 57 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 58 | // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ 59 | // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ 60 | // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ 61 | // "newLine": "crlf", /* Set the newline character for emitting files. */ 62 | // "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */ 63 | // "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */ 64 | // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ 65 | // "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */ 66 | // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ 67 | 68 | /* Interop Constraints */ 69 | // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ 70 | // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ 71 | "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */ 72 | // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ 73 | "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ 74 | 75 | /* Type Checking */ 76 | "strict": true, /* Enable all strict type-checking options. */ 77 | // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */ 78 | // "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */ 79 | // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ 80 | // "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */ 81 | // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ 82 | // "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */ 83 | // "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */ 84 | // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ 85 | // "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */ 86 | // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */ 87 | // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ 88 | // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ 89 | // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ 90 | // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ 91 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ 92 | // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */ 93 | // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ 94 | // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ 95 | 96 | /* Completeness */ 97 | // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ 98 | "skipLibCheck": true /* Skip type checking all .d.ts files. */ 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /packages/swc/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": ["./src"], 3 | "extends": "../tsconfig.base.json", 4 | "compilerOptions": { 5 | /* Visit https://aka.ms/tsconfig.json to read more about this file */ 6 | 7 | /* Projects */ 8 | // "incremental": true, /* Enable incremental compilation */ 9 | // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ 10 | "tsBuildInfoFile": "./tsconfig.tsbuildinfo", /* Specify the folder for .tsbuildinfo incremental compilation files. */ 11 | // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */ 12 | // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ 13 | // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ 14 | 15 | /* Language and Environment */ 16 | // "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ 17 | // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ 18 | // "jsx": "preserve", /* Specify what JSX code is generated. */ 19 | // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ 20 | // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ 21 | // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */ 22 | // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ 23 | // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */ 24 | // "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */ 25 | // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ 26 | // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ 27 | 28 | /* Modules */ 29 | "module": "commonjs", /* Specify what module code is generated. */ 30 | // "rootDir": "./", /* Specify the root folder within your source files. */ 31 | // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ 32 | // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ 33 | // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ 34 | // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ 35 | // "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */ 36 | // "types": [], /* Specify type package names to be included without being referenced in a source file. */ 37 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 38 | // "resolveJsonModule": true, /* Enable importing .json files */ 39 | // "noResolve": true, /* Disallow `import`s, `require`s or ``s from expanding the number of files TypeScript should add to a project. */ 40 | 41 | /* JavaScript Support */ 42 | // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ 43 | // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ 44 | // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ 45 | 46 | /* Emit */ 47 | "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ 48 | // "declarationMap": true, /* Create sourcemaps for d.ts files. */ 49 | // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ 50 | // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ 51 | // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */ 52 | "outDir": "./dist", /* Specify an output folder for all emitted files. */ 53 | // "removeComments": true, /* Disable emitting comments. */ 54 | // "noEmit": true, /* Disable emitting files from a compilation. */ 55 | // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ 56 | // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */ 57 | // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ 58 | // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ 59 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 60 | // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ 61 | // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ 62 | // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ 63 | // "newLine": "crlf", /* Set the newline character for emitting files. */ 64 | // "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */ 65 | // "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */ 66 | // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ 67 | // "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */ 68 | // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ 69 | 70 | /* Interop Constraints */ 71 | // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ 72 | // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ 73 | "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */ 74 | // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ 75 | "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ 76 | 77 | /* Type Checking */ 78 | "strict": true, /* Enable all strict type-checking options. */ 79 | // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */ 80 | // "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */ 81 | // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ 82 | // "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */ 83 | // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ 84 | // "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */ 85 | // "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */ 86 | // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ 87 | // "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */ 88 | // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */ 89 | // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ 90 | // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ 91 | // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ 92 | // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ 93 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ 94 | // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */ 95 | // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ 96 | // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ 97 | 98 | /* Completeness */ 99 | // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ 100 | "skipLibCheck": true /* Skip type checking all .d.ts files. */ 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /packages/react/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": ["./src"], 3 | "extends": "../tsconfig.base.json", 4 | "compilerOptions": { 5 | /* Visit https://aka.ms/tsconfig.json to read more about this file */ 6 | 7 | /* Projects */ 8 | // "incremental": true, /* Enable incremental compilation */ 9 | // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ 10 | "tsBuildInfoFile": "./tsconfig.tsbuildinfo", /* Specify the folder for .tsbuildinfo incremental compilation files. */ 11 | // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */ 12 | // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ 13 | // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ 14 | 15 | /* Language and Environment */ 16 | // "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ 17 | // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ 18 | // "jsx": "preserve", /* Specify what JSX code is generated. */ 19 | // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ 20 | // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ 21 | // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */ 22 | // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ 23 | // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */ 24 | // "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */ 25 | // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ 26 | // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ 27 | 28 | /* Modules */ 29 | "module": "commonjs", /* Specify what module code is generated. */ 30 | // "rootDir": "./", /* Specify the root folder within your source files. */ 31 | // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ 32 | // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ 33 | // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ 34 | // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ 35 | // "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */ 36 | // "types": [], /* Specify type package names to be included without being referenced in a source file. */ 37 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 38 | // "resolveJsonModule": true, /* Enable importing .json files */ 39 | // "noResolve": true, /* Disallow `import`s, `require`s or ``s from expanding the number of files TypeScript should add to a project. */ 40 | 41 | /* JavaScript Support */ 42 | // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ 43 | // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ 44 | // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ 45 | 46 | /* Emit */ 47 | "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ 48 | // "declarationMap": true, /* Create sourcemaps for d.ts files. */ 49 | // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ 50 | // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ 51 | // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */ 52 | "outDir": "./dist", /* Specify an output folder for all emitted files. */ 53 | // "removeComments": true, /* Disable emitting comments. */ 54 | // "noEmit": true, /* Disable emitting files from a compilation. */ 55 | // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ 56 | // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */ 57 | // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ 58 | // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ 59 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 60 | // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ 61 | // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ 62 | // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ 63 | // "newLine": "crlf", /* Set the newline character for emitting files. */ 64 | // "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */ 65 | // "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */ 66 | // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ 67 | // "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */ 68 | // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ 69 | 70 | /* Interop Constraints */ 71 | // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ 72 | // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ 73 | "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */ 74 | // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ 75 | "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ 76 | 77 | /* Type Checking */ 78 | "strict": true, /* Enable all strict type-checking options. */ 79 | // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */ 80 | // "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */ 81 | // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ 82 | // "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */ 83 | // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ 84 | // "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */ 85 | // "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */ 86 | // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ 87 | // "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */ 88 | // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */ 89 | // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ 90 | // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ 91 | // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ 92 | // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ 93 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ 94 | // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */ 95 | // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ 96 | // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ 97 | 98 | /* Completeness */ 99 | // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ 100 | "skipLibCheck": true /* Skip type checking all .d.ts files. */ 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /examples/vite-swc-react/pnpm-lock.yaml: -------------------------------------------------------------------------------- 1 | lockfileVersion: 5.3 2 | 3 | specifiers: 4 | '@types/react': ^17.0.0 5 | '@types/react-dom': ^17.0.0 6 | '@vitejs/plugin-react': ^1.0.0 7 | react: ^17.0.0 8 | react-dom: ^17.0.0 9 | react-refresh: ^0.10.0 10 | typescript: ^4.3.2 11 | vite: ^2.6.4 12 | vite-plugin-swc-react: ^0.0.3 13 | 14 | dependencies: 15 | react: 17.0.2 16 | react-dom: 17.0.2_react@17.0.2 17 | react-refresh: 0.10.0 18 | vite-plugin-swc-react: 0.0.3_vite@2.6.7 19 | 20 | devDependencies: 21 | '@types/react': 17.0.30 22 | '@types/react-dom': 17.0.9 23 | '@vitejs/plugin-react': 1.0.4 24 | typescript: 4.4.4 25 | vite: 2.6.7 26 | 27 | packages: 28 | 29 | /@babel/code-frame/7.15.8: 30 | resolution: {integrity: sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg==} 31 | engines: {node: '>=6.9.0'} 32 | dependencies: 33 | '@babel/highlight': 7.14.5 34 | dev: true 35 | 36 | /@babel/compat-data/7.15.0: 37 | resolution: {integrity: sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA==} 38 | engines: {node: '>=6.9.0'} 39 | dev: true 40 | 41 | /@babel/core/7.15.8: 42 | resolution: {integrity: sha512-3UG9dsxvYBMYwRv+gS41WKHno4K60/9GPy1CJaH6xy3Elq8CTtvtjT5R5jmNhXfCYLX2mTw+7/aq5ak/gOE0og==} 43 | engines: {node: '>=6.9.0'} 44 | dependencies: 45 | '@babel/code-frame': 7.15.8 46 | '@babel/generator': 7.15.8 47 | '@babel/helper-compilation-targets': 7.15.4_@babel+core@7.15.8 48 | '@babel/helper-module-transforms': 7.15.8 49 | '@babel/helpers': 7.15.4 50 | '@babel/parser': 7.15.8 51 | '@babel/template': 7.15.4 52 | '@babel/traverse': 7.15.4 53 | '@babel/types': 7.15.6 54 | convert-source-map: 1.8.0 55 | debug: 4.3.2 56 | gensync: 1.0.0-beta.2 57 | json5: 2.2.0 58 | semver: 6.3.0 59 | source-map: 0.5.7 60 | transitivePeerDependencies: 61 | - supports-color 62 | dev: true 63 | 64 | /@babel/generator/7.15.8: 65 | resolution: {integrity: sha512-ECmAKstXbp1cvpTTZciZCgfOt6iN64lR0d+euv3UZisU5awfRawOvg07Utn/qBGuH4bRIEZKrA/4LzZyXhZr8g==} 66 | engines: {node: '>=6.9.0'} 67 | dependencies: 68 | '@babel/types': 7.15.6 69 | jsesc: 2.5.2 70 | source-map: 0.5.7 71 | dev: true 72 | 73 | /@babel/helper-annotate-as-pure/7.15.4: 74 | resolution: {integrity: sha512-QwrtdNvUNsPCj2lfNQacsGSQvGX8ee1ttrBrcozUP2Sv/jylewBP/8QFe6ZkBsC8T/GYWonNAWJV4aRR9AL2DA==} 75 | engines: {node: '>=6.9.0'} 76 | dependencies: 77 | '@babel/types': 7.15.6 78 | dev: true 79 | 80 | /@babel/helper-compilation-targets/7.15.4_@babel+core@7.15.8: 81 | resolution: {integrity: sha512-rMWPCirulnPSe4d+gwdWXLfAXTTBj8M3guAf5xFQJ0nvFY7tfNAFnWdqaHegHlgDZOCT4qvhF3BYlSJag8yhqQ==} 82 | engines: {node: '>=6.9.0'} 83 | peerDependencies: 84 | '@babel/core': ^7.0.0 85 | dependencies: 86 | '@babel/compat-data': 7.15.0 87 | '@babel/core': 7.15.8 88 | '@babel/helper-validator-option': 7.14.5 89 | browserslist: 4.17.4 90 | semver: 6.3.0 91 | dev: true 92 | 93 | /@babel/helper-function-name/7.15.4: 94 | resolution: {integrity: sha512-Z91cOMM4DseLIGOnog+Z8OI6YseR9bua+HpvLAQ2XayUGU+neTtX+97caALaLdyu53I/fjhbeCnWnRH1O3jFOw==} 95 | engines: {node: '>=6.9.0'} 96 | dependencies: 97 | '@babel/helper-get-function-arity': 7.15.4 98 | '@babel/template': 7.15.4 99 | '@babel/types': 7.15.6 100 | dev: true 101 | 102 | /@babel/helper-get-function-arity/7.15.4: 103 | resolution: {integrity: sha512-1/AlxSF92CmGZzHnC515hm4SirTxtpDnLEJ0UyEMgTMZN+6bxXKg04dKhiRx5Enel+SUA1G1t5Ed/yQia0efrA==} 104 | engines: {node: '>=6.9.0'} 105 | dependencies: 106 | '@babel/types': 7.15.6 107 | dev: true 108 | 109 | /@babel/helper-hoist-variables/7.15.4: 110 | resolution: {integrity: sha512-VTy085egb3jUGVK9ycIxQiPbquesq0HUQ+tPO0uv5mPEBZipk+5FkRKiWq5apuyTE9FUrjENB0rCf8y+n+UuhA==} 111 | engines: {node: '>=6.9.0'} 112 | dependencies: 113 | '@babel/types': 7.15.6 114 | dev: true 115 | 116 | /@babel/helper-member-expression-to-functions/7.15.4: 117 | resolution: {integrity: sha512-cokOMkxC/BTyNP1AlY25HuBWM32iCEsLPI4BHDpJCHHm1FU2E7dKWWIXJgQgSFiu4lp8q3bL1BIKwqkSUviqtA==} 118 | engines: {node: '>=6.9.0'} 119 | dependencies: 120 | '@babel/types': 7.15.6 121 | dev: true 122 | 123 | /@babel/helper-module-imports/7.15.4: 124 | resolution: {integrity: sha512-jeAHZbzUwdW/xHgHQ3QmWR4Jg6j15q4w/gCfwZvtqOxoo5DKtLHk8Bsf4c5RZRC7NmLEs+ohkdq8jFefuvIxAA==} 125 | engines: {node: '>=6.9.0'} 126 | dependencies: 127 | '@babel/types': 7.15.6 128 | dev: true 129 | 130 | /@babel/helper-module-transforms/7.15.8: 131 | resolution: {integrity: sha512-DfAfA6PfpG8t4S6npwzLvTUpp0sS7JrcuaMiy1Y5645laRJIp/LiLGIBbQKaXSInK8tiGNI7FL7L8UvB8gdUZg==} 132 | engines: {node: '>=6.9.0'} 133 | dependencies: 134 | '@babel/helper-module-imports': 7.15.4 135 | '@babel/helper-replace-supers': 7.15.4 136 | '@babel/helper-simple-access': 7.15.4 137 | '@babel/helper-split-export-declaration': 7.15.4 138 | '@babel/helper-validator-identifier': 7.15.7 139 | '@babel/template': 7.15.4 140 | '@babel/traverse': 7.15.4 141 | '@babel/types': 7.15.6 142 | transitivePeerDependencies: 143 | - supports-color 144 | dev: true 145 | 146 | /@babel/helper-optimise-call-expression/7.15.4: 147 | resolution: {integrity: sha512-E/z9rfbAOt1vDW1DR7k4SzhzotVV5+qMciWV6LaG1g4jeFrkDlJedjtV4h0i4Q/ITnUu+Pk08M7fczsB9GXBDw==} 148 | engines: {node: '>=6.9.0'} 149 | dependencies: 150 | '@babel/types': 7.15.6 151 | dev: true 152 | 153 | /@babel/helper-plugin-utils/7.14.5: 154 | resolution: {integrity: sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==} 155 | engines: {node: '>=6.9.0'} 156 | dev: true 157 | 158 | /@babel/helper-replace-supers/7.15.4: 159 | resolution: {integrity: sha512-/ztT6khaXF37MS47fufrKvIsiQkx1LBRvSJNzRqmbyeZnTwU9qBxXYLaaT/6KaxfKhjs2Wy8kG8ZdsFUuWBjzw==} 160 | engines: {node: '>=6.9.0'} 161 | dependencies: 162 | '@babel/helper-member-expression-to-functions': 7.15.4 163 | '@babel/helper-optimise-call-expression': 7.15.4 164 | '@babel/traverse': 7.15.4 165 | '@babel/types': 7.15.6 166 | transitivePeerDependencies: 167 | - supports-color 168 | dev: true 169 | 170 | /@babel/helper-simple-access/7.15.4: 171 | resolution: {integrity: sha512-UzazrDoIVOZZcTeHHEPYrr1MvTR/K+wgLg6MY6e1CJyaRhbibftF6fR2KU2sFRtI/nERUZR9fBd6aKgBlIBaPg==} 172 | engines: {node: '>=6.9.0'} 173 | dependencies: 174 | '@babel/types': 7.15.6 175 | dev: true 176 | 177 | /@babel/helper-split-export-declaration/7.15.4: 178 | resolution: {integrity: sha512-HsFqhLDZ08DxCpBdEVtKmywj6PQbwnF6HHybur0MAnkAKnlS6uHkwnmRIkElB2Owpfb4xL4NwDmDLFubueDXsw==} 179 | engines: {node: '>=6.9.0'} 180 | dependencies: 181 | '@babel/types': 7.15.6 182 | dev: true 183 | 184 | /@babel/helper-validator-identifier/7.15.7: 185 | resolution: {integrity: sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==} 186 | engines: {node: '>=6.9.0'} 187 | dev: true 188 | 189 | /@babel/helper-validator-option/7.14.5: 190 | resolution: {integrity: sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==} 191 | engines: {node: '>=6.9.0'} 192 | dev: true 193 | 194 | /@babel/helpers/7.15.4: 195 | resolution: {integrity: sha512-V45u6dqEJ3w2rlryYYXf6i9rQ5YMNu4FLS6ngs8ikblhu2VdR1AqAd6aJjBzmf2Qzh6KOLqKHxEN9+TFbAkAVQ==} 196 | engines: {node: '>=6.9.0'} 197 | dependencies: 198 | '@babel/template': 7.15.4 199 | '@babel/traverse': 7.15.4 200 | '@babel/types': 7.15.6 201 | transitivePeerDependencies: 202 | - supports-color 203 | dev: true 204 | 205 | /@babel/highlight/7.14.5: 206 | resolution: {integrity: sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==} 207 | engines: {node: '>=6.9.0'} 208 | dependencies: 209 | '@babel/helper-validator-identifier': 7.15.7 210 | chalk: 2.4.2 211 | js-tokens: 4.0.0 212 | dev: true 213 | 214 | /@babel/parser/7.15.8: 215 | resolution: {integrity: sha512-BRYa3wcQnjS/nqI8Ac94pYYpJfojHVvVXJ97+IDCImX4Jc8W8Xv1+47enbruk+q1etOpsQNwnfFcNGw+gtPGxA==} 216 | engines: {node: '>=6.0.0'} 217 | hasBin: true 218 | dev: true 219 | 220 | /@babel/plugin-syntax-jsx/7.14.5_@babel+core@7.15.8: 221 | resolution: {integrity: sha512-ohuFIsOMXJnbOMRfX7/w7LocdR6R7whhuRD4ax8IipLcLPlZGJKkBxgHp++U4N/vKyU16/YDQr2f5seajD3jIw==} 222 | engines: {node: '>=6.9.0'} 223 | peerDependencies: 224 | '@babel/core': ^7.0.0-0 225 | dependencies: 226 | '@babel/core': 7.15.8 227 | '@babel/helper-plugin-utils': 7.14.5 228 | dev: true 229 | 230 | /@babel/plugin-transform-react-jsx-development/7.14.5_@babel+core@7.15.8: 231 | resolution: {integrity: sha512-rdwG/9jC6QybWxVe2UVOa7q6cnTpw8JRRHOxntG/h6g/guAOe6AhtQHJuJh5FwmnXIT1bdm5vC2/5huV8ZOorQ==} 232 | engines: {node: '>=6.9.0'} 233 | peerDependencies: 234 | '@babel/core': ^7.0.0-0 235 | dependencies: 236 | '@babel/core': 7.15.8 237 | '@babel/plugin-transform-react-jsx': 7.14.9_@babel+core@7.15.8 238 | dev: true 239 | 240 | /@babel/plugin-transform-react-jsx-self/7.14.9_@babel+core@7.15.8: 241 | resolution: {integrity: sha512-Fqqu0f8zv9W+RyOnx29BX/RlEsBRANbOf5xs5oxb2aHP4FKbLXxIaVPUiCti56LAR1IixMH4EyaixhUsKqoBHw==} 242 | engines: {node: '>=6.9.0'} 243 | peerDependencies: 244 | '@babel/core': ^7.0.0-0 245 | dependencies: 246 | '@babel/core': 7.15.8 247 | '@babel/helper-plugin-utils': 7.14.5 248 | dev: true 249 | 250 | /@babel/plugin-transform-react-jsx-source/7.14.5_@babel+core@7.15.8: 251 | resolution: {integrity: sha512-1TpSDnD9XR/rQ2tzunBVPThF5poaYT9GqP+of8fAtguYuI/dm2RkrMBDemsxtY0XBzvW7nXjYM0hRyKX9QYj7Q==} 252 | engines: {node: '>=6.9.0'} 253 | peerDependencies: 254 | '@babel/core': ^7.0.0-0 255 | dependencies: 256 | '@babel/core': 7.15.8 257 | '@babel/helper-plugin-utils': 7.14.5 258 | dev: true 259 | 260 | /@babel/plugin-transform-react-jsx/7.14.9_@babel+core@7.15.8: 261 | resolution: {integrity: sha512-30PeETvS+AeD1f58i1OVyoDlVYQhap/K20ZrMjLmmzmC2AYR/G43D4sdJAaDAqCD3MYpSWbmrz3kES158QSLjw==} 262 | engines: {node: '>=6.9.0'} 263 | peerDependencies: 264 | '@babel/core': ^7.0.0-0 265 | dependencies: 266 | '@babel/core': 7.15.8 267 | '@babel/helper-annotate-as-pure': 7.15.4 268 | '@babel/helper-module-imports': 7.15.4 269 | '@babel/helper-plugin-utils': 7.14.5 270 | '@babel/plugin-syntax-jsx': 7.14.5_@babel+core@7.15.8 271 | '@babel/types': 7.15.6 272 | dev: true 273 | 274 | /@babel/template/7.15.4: 275 | resolution: {integrity: sha512-UgBAfEa1oGuYgDIPM2G+aHa4Nlo9Lh6mGD2bDBGMTbYnc38vulXPuC1MGjYILIEmlwl6Rd+BPR9ee3gm20CBtg==} 276 | engines: {node: '>=6.9.0'} 277 | dependencies: 278 | '@babel/code-frame': 7.15.8 279 | '@babel/parser': 7.15.8 280 | '@babel/types': 7.15.6 281 | dev: true 282 | 283 | /@babel/traverse/7.15.4: 284 | resolution: {integrity: sha512-W6lQD8l4rUbQR/vYgSuCAE75ADyyQvOpFVsvPPdkhf6lATXAsQIG9YdtOcu8BB1dZ0LKu+Zo3c1wEcbKeuhdlA==} 285 | engines: {node: '>=6.9.0'} 286 | dependencies: 287 | '@babel/code-frame': 7.15.8 288 | '@babel/generator': 7.15.8 289 | '@babel/helper-function-name': 7.15.4 290 | '@babel/helper-hoist-variables': 7.15.4 291 | '@babel/helper-split-export-declaration': 7.15.4 292 | '@babel/parser': 7.15.8 293 | '@babel/types': 7.15.6 294 | debug: 4.3.2 295 | globals: 11.12.0 296 | transitivePeerDependencies: 297 | - supports-color 298 | dev: true 299 | 300 | /@babel/types/7.15.6: 301 | resolution: {integrity: sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig==} 302 | engines: {node: '>=6.9.0'} 303 | dependencies: 304 | '@babel/helper-validator-identifier': 7.15.7 305 | to-fast-properties: 2.0.0 306 | dev: true 307 | 308 | /@napi-rs/triples/1.0.3: 309 | resolution: {integrity: sha512-jDJTpta+P4p1NZTFVLHJ/TLFVYVcOqv6l8xwOeBKNPMgY/zDYH/YH7SJbvrr/h1RcS9GzbPcLKGzpuK9cV56UA==} 310 | dev: false 311 | 312 | /@node-rs/helper/1.2.1: 313 | resolution: {integrity: sha512-R5wEmm8nbuQU0YGGmYVjEc0OHtYsuXdpRG+Ut/3wZ9XAvQWyThN08bTh2cBJgoZxHQUPtvRfeQuxcAgLuiBISg==} 314 | dependencies: 315 | '@napi-rs/triples': 1.0.3 316 | dev: false 317 | 318 | /@rollup/pluginutils/4.1.1: 319 | resolution: {integrity: sha512-clDjivHqWGXi7u+0d2r2sBi4Ie6VLEAzWMIkvJLnDmxoOhBYOTfzGbOQBA32THHm11/LiJbd01tJUpJsbshSWQ==} 320 | engines: {node: '>= 8.0.0'} 321 | dependencies: 322 | estree-walker: 2.0.2 323 | picomatch: 2.3.0 324 | dev: true 325 | 326 | /@swc/core-android-arm64/1.2.98: 327 | resolution: {integrity: sha512-+ISOkXs2U+YnEN0s71K7ZGA/UCV0I2aYCSdc26cWb/bpoi+ZXaksTz44KS7UMjXpi30pvQyaIYL6uJKdEBFnmg==} 328 | engines: {node: '>=10'} 329 | cpu: [arm64] 330 | os: [android] 331 | requiresBuild: true 332 | dev: false 333 | optional: true 334 | 335 | /@swc/core-darwin-arm64/1.2.98: 336 | resolution: {integrity: sha512-pmf86HywLT1C/ZkWDki4iXzZcrzeCgRMbQsqcT2mYAgp83G4UcKKQdPAwlrf8ZeGnupdFac5KV4vHh1fgJL5hg==} 337 | engines: {node: '>=10'} 338 | cpu: [arm64] 339 | os: [darwin] 340 | requiresBuild: true 341 | dev: false 342 | optional: true 343 | 344 | /@swc/core-darwin-x64/1.2.98: 345 | resolution: {integrity: sha512-PMG/8W9dqHM+gAovtJqp03g8/9yDNISsHZroeoRKCYEddMLXsSj/zxKabcRW1xF3U6qD5v266B1ICDv4l7FpZA==} 346 | engines: {node: '>=10'} 347 | cpu: [x64] 348 | os: [darwin] 349 | requiresBuild: true 350 | dev: false 351 | optional: true 352 | 353 | /@swc/core-linux-arm-gnueabihf/1.2.98: 354 | resolution: {integrity: sha512-I9HG8wx3Pnkx/gXKHyjVCC1vLvzudpZ96KtVcEnFdqKskJ8F8vjJkttNiDWsqCqROxN9V6fl38+lqTFHg82A1g==} 355 | engines: {node: '>=10'} 356 | cpu: [arm] 357 | os: [linux] 358 | requiresBuild: true 359 | dev: false 360 | optional: true 361 | 362 | /@swc/core-linux-arm64-gnu/1.2.98: 363 | resolution: {integrity: sha512-sQoGY4LQaYJPE21s5nbaTAoeikK48yqtHCjw3HZykexF69tCidUDD7bUjRh8znPXSj6Ev5E3MwQv4HnIGDvuAg==} 364 | engines: {node: '>=10'} 365 | cpu: [arm64] 366 | os: [linux] 367 | requiresBuild: true 368 | dev: false 369 | optional: true 370 | 371 | /@swc/core-linux-arm64-musl/1.2.98: 372 | resolution: {integrity: sha512-IGuzCsEjy/XwZAxnOi+JCKvau5nUoQUL/NscZNh6TRDe3aqUuXgGxKgTQDsttF75amfTWv4wf6yhghL6HZ5+Kg==} 373 | engines: {node: '>=10'} 374 | cpu: [arm64] 375 | os: [linux] 376 | requiresBuild: true 377 | dev: false 378 | optional: true 379 | 380 | /@swc/core-linux-x64-gnu/1.2.98: 381 | resolution: {integrity: sha512-vJTQHgOjMcYg6XMdV0w9VDiNXyowk+ix4ZNF5GaSI6hu5kCMjV46qyhbIk3K2QHWEA43PyND8zZ8bQpRvVeOpA==} 382 | engines: {node: '>=10'} 383 | cpu: [x64] 384 | os: [linux] 385 | requiresBuild: true 386 | dev: false 387 | optional: true 388 | 389 | /@swc/core-linux-x64-musl/1.2.98: 390 | resolution: {integrity: sha512-IAIf1ouTRClEUPcMY1SFMKBWFFyh8BILrE6XowNnw1AeQQlnc9X2pOOLEuFxOg1hqfXxar+mkCnOF4W0DcGfRg==} 391 | engines: {node: '>=10'} 392 | cpu: [x64] 393 | os: [linux] 394 | requiresBuild: true 395 | dev: false 396 | optional: true 397 | 398 | /@swc/core-win32-arm64-msvc/1.2.98: 399 | resolution: {integrity: sha512-X9Rl+q/gPudW5Y1RgHzK/vphq2INFbonoA/VCc23ddeGxAmf1BgqTlc7HPw4lVVnxjDdzHiiQVFonupVDWr+6Q==} 400 | engines: {node: '>=10'} 401 | cpu: [arm64] 402 | os: [win32] 403 | requiresBuild: true 404 | dev: false 405 | optional: true 406 | 407 | /@swc/core-win32-ia32-msvc/1.2.98: 408 | resolution: {integrity: sha512-t/JyJ1ffw+Mmw/RH3otuj/Mk/MsrQ0O0ZmvKYkKn1tmo57muuDVfiMLRtJdH56pr2L1mK042eYfx5vbnLUe8Hw==} 409 | engines: {node: '>=10'} 410 | cpu: [ia32] 411 | os: [win32] 412 | requiresBuild: true 413 | dev: false 414 | optional: true 415 | 416 | /@swc/core-win32-x64-msvc/1.2.98: 417 | resolution: {integrity: sha512-KmOK+lIH7++uzBr3pmA5tvEhCdaoB5PP80k4FCbe6v1V70N03NrnWKPHAn7w1hFqIlsTc4+wZ2amhYPDpUr0ng==} 418 | engines: {node: '>=10'} 419 | cpu: [x64] 420 | os: [win32] 421 | requiresBuild: true 422 | dev: false 423 | optional: true 424 | 425 | /@swc/core/1.2.98: 426 | resolution: {integrity: sha512-Be4hJKhe2xR0QLlxw7u3b5JPvj4rWXxmXwkqjib0QyjX8Uhc3f++mM47OVuYyj+k5NqaCIG1ajbi4cVp+s6R9g==} 427 | engines: {node: '>=10'} 428 | dependencies: 429 | '@node-rs/helper': 1.2.1 430 | optionalDependencies: 431 | '@swc/core-android-arm64': 1.2.98 432 | '@swc/core-darwin-arm64': 1.2.98 433 | '@swc/core-darwin-x64': 1.2.98 434 | '@swc/core-linux-arm-gnueabihf': 1.2.98 435 | '@swc/core-linux-arm64-gnu': 1.2.98 436 | '@swc/core-linux-arm64-musl': 1.2.98 437 | '@swc/core-linux-x64-gnu': 1.2.98 438 | '@swc/core-linux-x64-musl': 1.2.98 439 | '@swc/core-win32-arm64-msvc': 1.2.98 440 | '@swc/core-win32-ia32-msvc': 1.2.98 441 | '@swc/core-win32-x64-msvc': 1.2.98 442 | dev: false 443 | 444 | /@types/prop-types/15.7.4: 445 | resolution: {integrity: sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==} 446 | dev: true 447 | 448 | /@types/react-dom/17.0.9: 449 | resolution: {integrity: sha512-wIvGxLfgpVDSAMH5utdL9Ngm5Owu0VsGmldro3ORLXV8CShrL8awVj06NuEXFQ5xyaYfdca7Sgbk/50Ri1GdPg==} 450 | dependencies: 451 | '@types/react': 17.0.30 452 | dev: true 453 | 454 | /@types/react/17.0.30: 455 | resolution: {integrity: sha512-3Dt/A8gd3TCXi2aRe84y7cK1K8G+N9CZRDG8kDGguOKa0kf/ZkSwTmVIDPsm/KbQOVMaDJXwhBtuOXxqwdpWVg==} 456 | dependencies: 457 | '@types/prop-types': 15.7.4 458 | '@types/scheduler': 0.16.2 459 | csstype: 3.0.9 460 | dev: true 461 | 462 | /@types/scheduler/0.16.2: 463 | resolution: {integrity: sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==} 464 | dev: true 465 | 466 | /@vitejs/plugin-react/1.0.4: 467 | resolution: {integrity: sha512-38/w1q2FON4e/es8WnAW0ZOa/RIOoOrpeWNUkgY6+u+M1eQZjyWWI0piLRM6fbDnm8Lm8Qtged8A7OZ/YnkNtw==} 468 | engines: {node: '>=12.0.0'} 469 | dependencies: 470 | '@babel/core': 7.15.8 471 | '@babel/plugin-transform-react-jsx': 7.14.9_@babel+core@7.15.8 472 | '@babel/plugin-transform-react-jsx-development': 7.14.5_@babel+core@7.15.8 473 | '@babel/plugin-transform-react-jsx-self': 7.14.9_@babel+core@7.15.8 474 | '@babel/plugin-transform-react-jsx-source': 7.14.5_@babel+core@7.15.8 475 | '@rollup/pluginutils': 4.1.1 476 | react-refresh: 0.10.0 477 | resolve: 1.20.0 478 | transitivePeerDependencies: 479 | - supports-color 480 | dev: true 481 | 482 | /ansi-styles/3.2.1: 483 | resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} 484 | engines: {node: '>=4'} 485 | dependencies: 486 | color-convert: 1.9.3 487 | dev: true 488 | 489 | /browserslist/4.17.4: 490 | resolution: {integrity: sha512-Zg7RpbZpIJRW3am9Lyckue7PLytvVxxhJj1CaJVlCWENsGEAOlnlt8X0ZxGRPp7Bt9o8tIRM5SEXy4BCPMJjLQ==} 491 | engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} 492 | hasBin: true 493 | dependencies: 494 | caniuse-lite: 1.0.30001267 495 | electron-to-chromium: 1.3.871 496 | escalade: 3.1.1 497 | node-releases: 2.0.0 498 | picocolors: 1.0.0 499 | dev: true 500 | 501 | /caniuse-lite/1.0.30001267: 502 | resolution: {integrity: sha512-r1mjTzAuJ9W8cPBGbbus8E0SKcUP7gn03R14Wk8FlAlqhH9hroy9nLqmpuXlfKEw/oILW+FGz47ipXV2O7x8lg==} 503 | dev: true 504 | 505 | /chalk/2.4.2: 506 | resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} 507 | engines: {node: '>=4'} 508 | dependencies: 509 | ansi-styles: 3.2.1 510 | escape-string-regexp: 1.0.5 511 | supports-color: 5.5.0 512 | dev: true 513 | 514 | /color-convert/1.9.3: 515 | resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} 516 | dependencies: 517 | color-name: 1.1.3 518 | dev: true 519 | 520 | /color-name/1.1.3: 521 | resolution: {integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=} 522 | dev: true 523 | 524 | /convert-source-map/1.8.0: 525 | resolution: {integrity: sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==} 526 | dependencies: 527 | safe-buffer: 5.1.2 528 | dev: true 529 | 530 | /csstype/3.0.9: 531 | resolution: {integrity: sha512-rpw6JPxK6Rfg1zLOYCSwle2GFOOsnjmDYDaBwEcwoOg4qlsIVCN789VkBZDJAGi4T07gI4YSutR43t9Zz4Lzuw==} 532 | dev: true 533 | 534 | /debug/4.3.2: 535 | resolution: {integrity: sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==} 536 | engines: {node: '>=6.0'} 537 | peerDependencies: 538 | supports-color: '*' 539 | peerDependenciesMeta: 540 | supports-color: 541 | optional: true 542 | dependencies: 543 | ms: 2.1.2 544 | dev: true 545 | 546 | /electron-to-chromium/1.3.871: 547 | resolution: {integrity: sha512-qcLvDUPf8DSIMWarHT2ptgcqrYg62n3vPA7vhrOF24d8UNzbUBaHu2CySiENR3nEDzYgaN60071t0F6KLYMQ7Q==} 548 | dev: true 549 | 550 | /esbuild-android-arm64/0.13.7: 551 | resolution: {integrity: sha512-yqCTKzmm3jiUXgi0yeKhvwZCZTqClUXwwMRAntcM9u/xvXhmpw0V0Z4qDEpnkmF2NCMzmJRH+DAAQ5whuf3CYA==} 552 | cpu: [arm64] 553 | os: [android] 554 | requiresBuild: true 555 | dev: true 556 | optional: true 557 | 558 | /esbuild-darwin-64/0.13.7: 559 | resolution: {integrity: sha512-MvsgMUWzq5FxoeJLSavw3rgQbaC55A8QTI1U2/8MWamtAeDKyzWQnglcsF0/TkjGLaKEqS0ZLo8akJ8q34BCtw==} 560 | cpu: [x64] 561 | os: [darwin] 562 | requiresBuild: true 563 | dev: true 564 | optional: true 565 | 566 | /esbuild-darwin-arm64/0.13.7: 567 | resolution: {integrity: sha512-tuP+dpIzXj17UC17VkHFDAH5nB7MajJK7sF8Fz4iVo8cml8YXj3MeNtjjLmx9YFvPs4XW3hFw1eqZJ06h2ssIA==} 568 | cpu: [arm64] 569 | os: [darwin] 570 | requiresBuild: true 571 | dev: true 572 | optional: true 573 | 574 | /esbuild-freebsd-64/0.13.7: 575 | resolution: {integrity: sha512-p07TrpkCJJyAXXCXFm2IpAvyASUTcuT0OF43riEsgjuRJmtaNBOUENecr2B2k/zd9wkGz6UyxxtnFntaBttkDg==} 576 | cpu: [x64] 577 | os: [freebsd] 578 | requiresBuild: true 579 | dev: true 580 | optional: true 581 | 582 | /esbuild-freebsd-arm64/0.13.7: 583 | resolution: {integrity: sha512-MCtfBRkE1GwAnjVoWPYoZ+S/+zanzWxAJVER1/8jmWobCXJG0w+YM2IXQ2fN4T9U96RusFWQDMJVoACnqhIAzg==} 584 | cpu: [arm64] 585 | os: [freebsd] 586 | requiresBuild: true 587 | dev: true 588 | optional: true 589 | 590 | /esbuild-linux-32/0.13.7: 591 | resolution: {integrity: sha512-HM4d16XbqToo93LPrgzkiLgX3Xgr9Mw67tEM8vjhHDx18JnaZqPdIsl5ZfCqRGHlLUq+GdFKl6+dH7WlsiWMCA==} 592 | cpu: [ia32] 593 | os: [linux] 594 | requiresBuild: true 595 | dev: true 596 | optional: true 597 | 598 | /esbuild-linux-64/0.13.7: 599 | resolution: {integrity: sha512-krgiIEyqcS0kfTjptGEQzdYwiEmmqpmiZHlKqZILVuU5BaIVWCBMmVx20HH9waJw1yT0Ao4fZTZ9kg8s/pKAYA==} 600 | cpu: [x64] 601 | os: [linux] 602 | requiresBuild: true 603 | dev: true 604 | optional: true 605 | 606 | /esbuild-linux-arm/0.13.7: 607 | resolution: {integrity: sha512-GOAt1brGG14mmQx2sRD3wHi3rih94OzhmDRVyo7JvlSmWOfEczPf7zL7YfmgjuktvvuLTERtTJzaih7nyCwPOg==} 608 | cpu: [arm] 609 | os: [linux] 610 | requiresBuild: true 611 | dev: true 612 | optional: true 613 | 614 | /esbuild-linux-arm64/0.13.7: 615 | resolution: {integrity: sha512-aM2BUTdbtzEUOuLqDusGCuWQRqc0JazgbA/6+Q9xhUgNLHGUMAsu4C5G0qPnJCTlWGZX+bcQYma6wFVEp9ibBg==} 616 | cpu: [arm64] 617 | os: [linux] 618 | requiresBuild: true 619 | dev: true 620 | optional: true 621 | 622 | /esbuild-linux-mips64le/0.13.7: 623 | resolution: {integrity: sha512-+UJq6cxpc2ldaQFdpEDrBhqhluXsqCNlWiHccIjq25r+3YbFg0c/RJEypoVU7tjhGXUGWyWWQ7SLkzHYpf+Nsg==} 624 | cpu: [mips64el] 625 | os: [linux] 626 | requiresBuild: true 627 | dev: true 628 | optional: true 629 | 630 | /esbuild-linux-ppc64le/0.13.7: 631 | resolution: {integrity: sha512-6zwpliO4ZZtodDYM1JJEmSMpkd07I8bnNOKoHe7TOs9VhylXJooHh5ObSbSvk3FxCBs+jL5bxb24p10/Cg4RGw==} 632 | cpu: [ppc64] 633 | os: [linux] 634 | requiresBuild: true 635 | dev: true 636 | optional: true 637 | 638 | /esbuild-netbsd-64/0.13.7: 639 | resolution: {integrity: sha512-CfTHeTfJWlwjgfpApXYvECytLD6BzTWovLE0+28KT7bjU5fM4ieDYzRvjWjFAOB2X6DWpaoQnJAlhJirQBW0EQ==} 640 | cpu: [x64] 641 | os: [netbsd] 642 | requiresBuild: true 643 | dev: true 644 | optional: true 645 | 646 | /esbuild-openbsd-64/0.13.7: 647 | resolution: {integrity: sha512-qfW+f0MQfl72zVwgbV00I1kAP2zty+N031cNnQINcBmzHOSbEbaBQbUM0kawq+wdfgS/Xmppgf7nD1H8GWAvow==} 648 | cpu: [x64] 649 | os: [openbsd] 650 | requiresBuild: true 651 | dev: true 652 | optional: true 653 | 654 | /esbuild-sunos-64/0.13.7: 655 | resolution: {integrity: sha512-fVRM9mV0wAYLt92IqzudxACMLJZRQFx1oJsNeU4fPFmUxIkYE4C7G7z9vqI2eu9bpDo1fA+3+5djo/T/28Mckg==} 656 | cpu: [x64] 657 | os: [sunos] 658 | requiresBuild: true 659 | dev: true 660 | optional: true 661 | 662 | /esbuild-windows-32/0.13.7: 663 | resolution: {integrity: sha512-v3csjeQtlHHWS1q/tE9rTRCSSU/fGvJVh1l7gkS93ysAaIMeC0j9Q0h2PxFpQ6yxuwftuDYfQdnkVGcqjkKM8A==} 664 | cpu: [ia32] 665 | os: [win32] 666 | requiresBuild: true 667 | dev: true 668 | optional: true 669 | 670 | /esbuild-windows-64/0.13.7: 671 | resolution: {integrity: sha512-vk+yv/vYpHZP0vxSaxaA4EMaicuxy4E435EXkbsgk5UgpcQgSP0CVlIeaqtgfSM3IwGnpbagOirRVqqZqxyMDQ==} 672 | cpu: [x64] 673 | os: [win32] 674 | requiresBuild: true 675 | dev: true 676 | optional: true 677 | 678 | /esbuild-windows-arm64/0.13.7: 679 | resolution: {integrity: sha512-0Fp+IeG5qWLCK+U6d8L9/SnXkI6f3JMtauSQ8HHzw3Fl0pZ+VImUAUWZ3g2fhthNqp+t8dB3n238CJD6XBn15w==} 680 | cpu: [arm64] 681 | os: [win32] 682 | requiresBuild: true 683 | dev: true 684 | optional: true 685 | 686 | /esbuild/0.13.7: 687 | resolution: {integrity: sha512-Ok3w+Pc9SNdNVEEJUUx9OvNZHwFyoKS0N+ceytfUB3wh/HxhRkOEc9dO8KR9AjfpFI82/Wg258GRDs1/8SFgKQ==} 688 | hasBin: true 689 | requiresBuild: true 690 | optionalDependencies: 691 | esbuild-android-arm64: 0.13.7 692 | esbuild-darwin-64: 0.13.7 693 | esbuild-darwin-arm64: 0.13.7 694 | esbuild-freebsd-64: 0.13.7 695 | esbuild-freebsd-arm64: 0.13.7 696 | esbuild-linux-32: 0.13.7 697 | esbuild-linux-64: 0.13.7 698 | esbuild-linux-arm: 0.13.7 699 | esbuild-linux-arm64: 0.13.7 700 | esbuild-linux-mips64le: 0.13.7 701 | esbuild-linux-ppc64le: 0.13.7 702 | esbuild-netbsd-64: 0.13.7 703 | esbuild-openbsd-64: 0.13.7 704 | esbuild-sunos-64: 0.13.7 705 | esbuild-windows-32: 0.13.7 706 | esbuild-windows-64: 0.13.7 707 | esbuild-windows-arm64: 0.13.7 708 | dev: true 709 | 710 | /escalade/3.1.1: 711 | resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} 712 | engines: {node: '>=6'} 713 | dev: true 714 | 715 | /escape-string-regexp/1.0.5: 716 | resolution: {integrity: sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=} 717 | engines: {node: '>=0.8.0'} 718 | dev: true 719 | 720 | /estree-walker/2.0.2: 721 | resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} 722 | dev: true 723 | 724 | /fsevents/2.3.2: 725 | resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} 726 | engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} 727 | os: [darwin] 728 | requiresBuild: true 729 | dev: true 730 | optional: true 731 | 732 | /function-bind/1.1.1: 733 | resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} 734 | dev: true 735 | 736 | /gensync/1.0.0-beta.2: 737 | resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} 738 | engines: {node: '>=6.9.0'} 739 | dev: true 740 | 741 | /globals/11.12.0: 742 | resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} 743 | engines: {node: '>=4'} 744 | dev: true 745 | 746 | /has-flag/3.0.0: 747 | resolution: {integrity: sha1-tdRU3CGZriJWmfNGfloH87lVuv0=} 748 | engines: {node: '>=4'} 749 | dev: true 750 | 751 | /has/1.0.3: 752 | resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} 753 | engines: {node: '>= 0.4.0'} 754 | dependencies: 755 | function-bind: 1.1.1 756 | dev: true 757 | 758 | /is-core-module/2.8.0: 759 | resolution: {integrity: sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==} 760 | dependencies: 761 | has: 1.0.3 762 | dev: true 763 | 764 | /js-tokens/4.0.0: 765 | resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} 766 | 767 | /jsesc/2.5.2: 768 | resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} 769 | engines: {node: '>=4'} 770 | hasBin: true 771 | dev: true 772 | 773 | /json5/2.2.0: 774 | resolution: {integrity: sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==} 775 | engines: {node: '>=6'} 776 | hasBin: true 777 | dependencies: 778 | minimist: 1.2.5 779 | dev: true 780 | 781 | /loose-envify/1.4.0: 782 | resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} 783 | hasBin: true 784 | dependencies: 785 | js-tokens: 4.0.0 786 | dev: false 787 | 788 | /minimist/1.2.5: 789 | resolution: {integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==} 790 | dev: true 791 | 792 | /ms/2.1.2: 793 | resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} 794 | dev: true 795 | 796 | /nanoid/3.1.30: 797 | resolution: {integrity: sha512-zJpuPDwOv8D2zq2WRoMe1HsfZthVewpel9CAvTfc/2mBD1uUT/agc5f7GHGWXlYkFvi1mVxe4IjvP2HNrop7nQ==} 798 | engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} 799 | hasBin: true 800 | dev: true 801 | 802 | /node-releases/2.0.0: 803 | resolution: {integrity: sha512-aA87l0flFYMzCHpTM3DERFSYxc6lv/BltdbRTOMZuxZ0cwZCD3mejE5n9vLhSJCN++/eOqr77G1IO5uXxlQYWA==} 804 | dev: true 805 | 806 | /object-assign/4.1.1: 807 | resolution: {integrity: sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=} 808 | engines: {node: '>=0.10.0'} 809 | dev: false 810 | 811 | /path-parse/1.0.7: 812 | resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} 813 | dev: true 814 | 815 | /picocolors/0.2.1: 816 | resolution: {integrity: sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==} 817 | dev: true 818 | 819 | /picocolors/1.0.0: 820 | resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} 821 | dev: true 822 | 823 | /picomatch/2.3.0: 824 | resolution: {integrity: sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==} 825 | engines: {node: '>=8.6'} 826 | dev: true 827 | 828 | /postcss/8.3.9: 829 | resolution: {integrity: sha512-f/ZFyAKh9Dnqytx5X62jgjhhzttjZS7hMsohcI7HEI5tjELX/HxCy3EFhsRxyzGvrzFF+82XPvCS8T9TFleVJw==} 830 | engines: {node: ^10 || ^12 || >=14} 831 | dependencies: 832 | nanoid: 3.1.30 833 | picocolors: 0.2.1 834 | source-map-js: 0.6.2 835 | dev: true 836 | 837 | /react-dom/17.0.2_react@17.0.2: 838 | resolution: {integrity: sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==} 839 | peerDependencies: 840 | react: 17.0.2 841 | dependencies: 842 | loose-envify: 1.4.0 843 | object-assign: 4.1.1 844 | react: 17.0.2 845 | scheduler: 0.20.2 846 | dev: false 847 | 848 | /react-refresh/0.10.0: 849 | resolution: {integrity: sha512-PgidR3wST3dDYKr6b4pJoqQFpPGNKDSCDx4cZoshjXipw3LzO7mG1My2pwEzz2JVkF+inx3xRpDeQLFQGH/hsQ==} 850 | engines: {node: '>=0.10.0'} 851 | 852 | /react/17.0.2: 853 | resolution: {integrity: sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==} 854 | engines: {node: '>=0.10.0'} 855 | dependencies: 856 | loose-envify: 1.4.0 857 | object-assign: 4.1.1 858 | dev: false 859 | 860 | /resolve/1.20.0: 861 | resolution: {integrity: sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==} 862 | dependencies: 863 | is-core-module: 2.8.0 864 | path-parse: 1.0.7 865 | dev: true 866 | 867 | /rollup/2.58.0: 868 | resolution: {integrity: sha512-NOXpusKnaRpbS7ZVSzcEXqxcLDOagN6iFS8p45RkoiMqPHDLwJm758UF05KlMoCRbLBTZsPOIa887gZJ1AiXvw==} 869 | engines: {node: '>=10.0.0'} 870 | hasBin: true 871 | optionalDependencies: 872 | fsevents: 2.3.2 873 | dev: true 874 | 875 | /safe-buffer/5.1.2: 876 | resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} 877 | dev: true 878 | 879 | /scheduler/0.20.2: 880 | resolution: {integrity: sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==} 881 | dependencies: 882 | loose-envify: 1.4.0 883 | object-assign: 4.1.1 884 | dev: false 885 | 886 | /semver/6.3.0: 887 | resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} 888 | hasBin: true 889 | dev: true 890 | 891 | /source-map-js/0.6.2: 892 | resolution: {integrity: sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==} 893 | engines: {node: '>=0.10.0'} 894 | dev: true 895 | 896 | /source-map/0.5.7: 897 | resolution: {integrity: sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=} 898 | engines: {node: '>=0.10.0'} 899 | dev: true 900 | 901 | /supports-color/5.5.0: 902 | resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} 903 | engines: {node: '>=4'} 904 | dependencies: 905 | has-flag: 3.0.0 906 | dev: true 907 | 908 | /to-fast-properties/2.0.0: 909 | resolution: {integrity: sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=} 910 | engines: {node: '>=4'} 911 | dev: true 912 | 913 | /typescript/4.4.4: 914 | resolution: {integrity: sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==} 915 | engines: {node: '>=4.2.0'} 916 | hasBin: true 917 | dev: true 918 | 919 | /vite-plugin-swc-react/0.0.3_vite@2.6.7: 920 | resolution: {integrity: sha512-ZPVyxeygiBXY+D1Wt1nblbnMwEFxIisPfocRmFXrmzzGqhAR86lOsZ8LiyskvloZSYdMYqkPFLvrkcXmRugcng==} 921 | peerDependencies: 922 | vite: ^2.6.7 923 | dependencies: 924 | '@swc/core': 1.2.98 925 | vite: 2.6.7 926 | dev: false 927 | 928 | /vite/2.6.7: 929 | resolution: {integrity: sha512-ewk//jve9k6vlU8PfJmWUHN8k0YYdw4VaKOMvoQ3nT2Pb6k5OSMKQi4jPOzVH/TlUqMsCrq7IJ80xcuDDVyigg==} 930 | engines: {node: '>=12.2.0'} 931 | hasBin: true 932 | peerDependencies: 933 | less: '*' 934 | sass: '*' 935 | stylus: '*' 936 | peerDependenciesMeta: 937 | less: 938 | optional: true 939 | sass: 940 | optional: true 941 | stylus: 942 | optional: true 943 | dependencies: 944 | esbuild: 0.13.7 945 | postcss: 8.3.9 946 | resolve: 1.20.0 947 | rollup: 2.58.0 948 | optionalDependencies: 949 | fsevents: 2.3.2 950 | dev: true 951 | --------------------------------------------------------------------------------