Skip to content

Commit

Permalink
Add named export
Browse files Browse the repository at this point in the history
There have be some issues with the default export, if another cjs module
requires this module.
see: arnoson/vite-plugin-kirby#1
  • Loading branch information
arnoson committed Sep 28, 2022
1 parent 51b4dab commit b53ba49
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export interface Config extends WatchOptions {
* with a traditional backend and want to trigger page reloads when you are
* changing for example php files.
*/
export default (
export const liveReload = (
paths: string | readonly string[],
config: Config = {}
): Plugin => ({
Expand All @@ -62,3 +62,5 @@ export default (
.on('change', reload)
}
})

export default liveReload

0 comments on commit b53ba49

Please sign in to comment.