diff --git a/.gitignore b/.gitignore index c0ced02..4d81cf5 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ # Composer files /vendor + +# kirbyup temp development entry +/index.dev.mjs diff --git a/README.md b/README.md index c78e2bc..2bb5c83 100755 --- a/README.md +++ b/README.md @@ -34,6 +34,16 @@ npm run dev This will automatically update the `index.js` and `index.css` of your plugin as soon as you make changes. Reload the Panel to see your code changes reflected. +With kirbyup 2.0.0+ and Kirby 3.7.4+ you can alternatively use hot module reloading (HMR): + +``` +npm run serve +``` + +This will start a development server that updates the page as soon as you make changes. Some updates are instant, like CSS or Vue template changes, others require a reload of the page, which happens automatically. + +> 💡 The live reload functionality requires top level await, [which is only supported in modern browsers](https://caniuse.com/mdn-javascript_operators_await_top_level). If you're developing in older browsers, use `npm run dev` and reload the page manually to see changes. + ### Production As soon as you are happy with your plugin, you should build the final version with: