mancku / strapi-plugin-schemas-to-ts

Strapi Plugin Schemas to TS is a plugin for Strapi v4 that automatically converts your Strapi schemas into Typescript interfaces.
MIT License
65 stars 20 forks source link

Types are rebuilding on every debugger reload #51

Open gregg-cbs opened 8 months ago

gregg-cbs commented 8 months ago

Hey Mancku, I have noticed that my dev server is rebuilding types every time it restarts. Its worth noting that I run strapi in debugger mode which could have something to do with it.

If i restart my debugger I see a full rebuild happens everytime and my terminal is being spammed by logs from this package - any thoughts?

image

To be fair, even strapi does quite a lot of rebuilding on debugger restarts.

mancku commented 8 months ago

Hi @gregg-cbs yes, it's something I couldn't figure out (how to avoid the plugin from being fired every time) but if you scroll down after the "Converting schema..." sentences, you'll find that files are not being modified every time, just when there are changes. When a file is not being modified, you'll see an "is up to date" message

gregg-cbs commented 8 months ago

Yeah its probably a webpack level thing and i think you will be blocked by that when working from within strapi. Looks like their diffing is not so great either.