prefresh
prefresh copied to clipboard
Implement SWC plugin
I'd like to help port the babel plugin to SWC. Can somebody please explain what the differences are between the react version and the Preact version? I plan to start with the react version (already ported) and make the necessary changes to support Preact.
+1 I also would like to se a SWC implementation therefore it would be a lot faster than babel like vite seem to move to SWC as well for the same reasons https://github.com/vitejs/vite-plugin-react-swc/blob/main/src/refresh-runtime.js
Hey, on the Babel side of things the two transforms are almost identical. The main difference in the Preact one is that we have this part extra to maintain and reset context references correctly
+1
A SWC plugin has been implemented at https://github.com/swc-project/plugins/pull/326
It's also published! https://www.npmjs.com/package/@swc/plugin-prefresh