FigmaToCode
FigmaToCode copied to clipboard
feat: migrate bundling to webpack 5
Migrated all bundling config to webpack 5 Deleted rollup config and unused packages
Closes #70
@bernaferrari bump
Hey! Thanks a lot! I'll review really really soon.
It doesn't work here :(
Try yarn dev
then change something, like "Tailwind is a utility-first" to "Tailwind is a utility-second" and re-open the plugin in Figma (ctrl+alt+p), it should change the text.
Hey, any news?
have figured it out!! The caveat is that HMR doesnt work but everything gets powered by a single webpack config and with caching, builds take less than a second. Will contribute by tomorrow
@bernaferrari hot reloading works for the code file but not for the ui code. this is because all ui code has to be inlined into the html file. but since that is only done once when the server starts and not on every change, it does not work for changes made after server has started
i might need to make a custom webpack plugin that takes the current one and also emits a new index.html whenever the ui plugin changes
@bernaferrari Fixed the issue without having to create a new webpack plugin. you can test it out now. first compile takes around 16 seconds, after that, new changes take 3-4 seconds to compile. i am on an intel mac so it should be faster on M1 or later
@bernaferrari friendly ping
I have a big update coming soon 👀
But yeah, I kind of forgot. But I've been working on something huge recently 😛.
Plugin is now using vite :P but thanks for the help!