Socket
Socket
Sign inDemoInstall

@vitejs/plugin-react-refresh

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vitejs/plugin-react-refresh

Provides [React Refresh](https://www.npmjs.com/package/react-refresh) support for Vite.


Version published
Weekly downloads
74K
decreased by-32.21%
Maintainers
1
Weekly downloads
 
Created
Source

@vitejs/plugin-react-refresh npm

Provides React Refresh support for Vite.

// vite.config.js
import reactRefresh from '@vitejs/plugin-react-refresh'

export default {
  plugins: [reactRefresh()]
}

Specifying Additional Parser Plugins

If you are using ES syntax that are still in proposal status (e.g. class properties), you can selectively enable them via the parserPlugins option:

export default {
  plugins: [reactRefresh({
    parserPlugins: [
      'classProperties',
      'classPrivateProperties
    ]
  })]
}

Full list of Babel parser plugins.

Notes

  • If using TSX, any TS-supported syntax will already be transpiled away so you won't need to specify them here.

  • This option only enables the plugin to parse these syntax - it does not perform any transpilation since this plugin is dev-only.

  • If you wish to transpile the syntax for production, you will need to configure the transform separately using @rollup/plugin-babel as a build-only plugin.

FAQs

Package last updated on 02 Feb 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc