Skip to content

Commit

Permalink
feat: enable HMR for .js files
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiVandivier committed Aug 15, 2024
1 parent 0233949 commit 5f4683c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cli/config/makeViteConfig.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,11 @@ export default ({ paths, config, env, host }) => {
* inline `webpackChunkName` usage. Third-party plugin.
*/
dynamicImport(),
react({ babel: { plugins: ['styled-jsx/babel'] } }),
react({
babel: { plugins: ['styled-jsx/babel'] },
// Enables HMR for .js files:
jsxRuntime: 'classic',
}),
],

// Allow JSX in .js pt. 2
Expand Down

0 comments on commit 5f4683c

Please sign in to comment.