0.0.2 • Published 4 years ago

vite-plugin-jsx-inject v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

A workaround for vite.config.js#esbuild.jsxInject option, which is going to deprecated in the future.

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