Skip to content

Commit

Permalink
feat(npm): auto configure HMR
Browse files Browse the repository at this point in the history
  • Loading branch information
innocenzi committed Jul 10, 2021
1 parent fb18e75 commit 79e7565
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions npm/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,17 @@ export class ViteConfiguration {
host: host.substr(2),
https: protocol === 'https',
port: port ? Number(port) : 3000,
hmr: {
host: host.substr(2),
port: Number(port) || 3000,
},
}
}

if (artisan?.entrypoints)
(this.build.rollupOptions!.input! as string[]).push(...artisan.entrypoints)
if (artisan?.entrypoints)
(this.build.rollupOptions!.input! as string[]).push(...artisan.entrypoints)

this.merge(config)
this.merge(config)
}
}

/**
Expand Down

0 comments on commit 79e7565

Please # to comment.