Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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'`)]
})
```