Skip to content

Commit

Permalink
fix(webpack+swc): only transform refresh when using devServer
Browse files Browse the repository at this point in the history
  • Loading branch information
wintercounter committed Jan 8, 2022
1 parent ecbfb23 commit bed80f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/configs/webpack/root/module/rules/10-swc.js
Expand Up @@ -9,7 +9,7 @@ export default rules => {
transform: {
react: {
development: isDevelopment,
refresh: isDevelopment
refresh: !!process.env.WEBPACK_DEV_SERVER
}
}
}
Expand Down

0 comments on commit bed80f9

Please sign in to comment.