1.6.1 • Published 2 years ago

vite-plugin-jsx-sfc v1.6.1

Weekly downloads
205
License
MIT
Repository
github
Last release
2 years ago

vite-plugin-jsx-sfc

Vite plugin for compile and enhance the limitation of jsx-sfc runtime code.

Usage

npm install jsx-sfc vite-plugin-jsx-sfc
  • Configure Vite(v2.x with @vitejs/plugin-react):
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import jsxSfc from 'vite-plugin-jsx-sfc';

export default defineConfig({
  plugins: [jsxSfc({ transformJsx: false }), react()]
});
  • Configure Vite(v2.x with @vitejs/plugin-react-refresh):
import { defineConfig } from 'vite';
import reactRefresh from '@vitejs/plugin-react-refresh';
import jsxSfc from 'vite-plugin-jsx-sfc';

export default defineConfig({
  plugins: [jsxSfc(), reactRefresh()]
});
  • Configure Vite(v1.x):
// vite.config.js
import reactPlugin from 'vite-plugin-react';
import sfcPlugin from 'vite-plugin-jsx-sfc/legacy';

const config = {
  ...
  plugins: [sfcPlugin, reactPlugin]
}

License

MIT

1.6.1

2 years ago

1.6.0

4 years ago

1.5.2

4 years ago

1.5.1

4 years ago

1.5.0

4 years ago

1.4.2

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.7

4 years ago

1.3.6

4 years ago

1.3.8

4 years ago

1.3.5

4 years ago

1.3.4

4 years ago

1.3.3

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.3.0-alpha.5

4 years ago

1.3.0-alpha.2

4 years ago

1.3.0-alpha.1

4 years ago

1.3.0-alpha.4

4 years ago

1.3.0-alpha.3

4 years ago

1.2.0

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

1.0.0-alpha.11

4 years ago

1.0.0-alpha.10

4 years ago

1.0.0-alpha.9

4 years ago

1.0.0-alpha.8

4 years ago

1.0.0-alpha.7

4 years ago

1.0.0-alpha.6

4 years ago

1.0.0-alpha.5

4 years ago

1.0.0-alpha.4

4 years ago

1.0.0-alpha.3

4 years ago

1.0.0-alpha.1

4 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.0

5 years ago

0.2.2-alpha.1

5 years ago