JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 103567
  • Score
    100M100P100Q49005F
  • License MIT

Package Exports

  • @vitejs/plugin-react-refresh

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@vitejs/plugin-react-refresh) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@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.