Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hyf0/vite-plugin-jsx-inject
A workaround for vite.config.js#esbuild.jsxInject option, which is going to be deprecated.
https://github.com/hyf0/vite-plugin-jsx-inject
Last synced: 23 days ago
JSON representation
A workaround for vite.config.js#esbuild.jsxInject option, which is going to be deprecated.
- Host: GitHub
- URL: https://github.com/hyf0/vite-plugin-jsx-inject
- Owner: hyf0
- License: mit
- Created: 2021-08-18T12:11:09.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-08-19T00:41:25.000Z (about 3 years ago)
- Last Synced: 2024-10-11T14:39:04.922Z (25 days ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A workaround for vite.config.js#esbuild.jsxInject option, which is going to be deprecated in the future.
```js
// vite.config.js
export default defineConfig({
esbuild: {
jsxInject: `import React from 'react'`
}
})
// =>
// vite.config.js
import jsxInject from 'vite-plugin-jsx-inject'
export default defineConfig({
plugins: [jsxInject(`import React from 'react'`)]
})
```