arnoson / kirby-vite

Use Kirby CMS together with Vite
MIT License
81 stars 7 forks source link

Make isDev() method public #43

Closed s3ththompson closed 8 months ago

s3ththompson commented 9 months ago

Currently, the vite()->isDev() method is protected. I'd like to be able to call this method in template code from userland.

Use case

@vitejs/plugin-react will throw an error if the refresh runtime hook is not manually included in a server template. This is a script that should be included in development only, exactly how @vite/client is inserted.

s3ththompson commented 9 months ago

Happy to submit a PR for the above functionality, if you're open to it!

arnoson commented 9 months ago

Seems like a good idea!