
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
vite-plugin-swc-react
Advanced tools
npx degit iheyunfei/vite-swc-react-ts my-project
// or using javascript template
npx degit iheyunfei/vite-swc-react my-project
cd my-project
npm install
npm run dev
yarn add -D vite-plugin-swc-react
// or
npm install -D vite-plugin-swc-react
import { defineConfig } from 'vite'
import swcReact from 'vite-plugin-swc-react'
export default defineConfig({
plugins: [swcReact()],
})
To enable polyfill, you would need to
browserlist as a devDependencycore-js as a dependencyimport { defineConfig } from 'vite'
import swcReact from 'vite-plugin-swc-react'
export default defineConfig({
plugins: [
swcReact({
swcOptions: {
env: {
// https://vitejs.dev/guide/build.html#browser-compatibility
targets: 'defaults and supports es6-module and supports es6-module-dynamic-import, not opera > 0, not samsung > 0, not and_qq > 0',
mode: 'usage',
coreJs: 3,
}
}
}),
],
})
If your target browser only supports ES5, you may want to checkout @vitejs/plugin-legacy.
import { defineConfig } from 'vite'
import swcReact from 'vite-plugin-swc-react'
export default defineConfig({
plugins: [
swcReact({
reactFresh: false,
}),
],
})
import { defineConfig } from 'vite'
import swcReact from 'vite-plugin-swc-react'
export default defineConfig({
plugins: [
swcReact({
swcOptions: {
jsc: {
transform: {
react: {
runtime: 'classic',
},
},
},
},
}),
],
})
FAQs
# features
The npm package vite-plugin-swc-react receives a total of 3,801 weekly downloads. As such, vite-plugin-swc-react popularity was classified as popular.
We found that vite-plugin-swc-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.