Skip to content

Commit 07ae41b

Browse files
docs: add documentation on HMR/live reload to migration docs (#2022)
1 parent 2b26936 commit 07ae41b

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

apps/docs-app/docs/guides/migrating.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,24 @@ export default defineConfig(({ mode }) => ({
178178
plugins: [analog(), nxCopyAssetsPlugin(['*.md'])],
179179
}));
180180
```
181+
182+
## Enabling HMR
183+
184+
Angular supports HMR/Live reload where in most cases components can be updated without a page reload. To enable it in Analog, use the `liveReload: true` option.
185+
186+
```ts
187+
/// <reference types="vitest" />
188+
189+
import { defineConfig } from 'vite';
190+
import analog from '@analogjs/platform';
191+
192+
// https://vitejs.dev/config/
193+
export default defineConfig(({ mode }) => ({
194+
// .. other configuration
195+
plugins: [
196+
analog({
197+
liveReload: true,
198+
}),
199+
],
200+
}));
201+
```

0 commit comments

Comments
 (0)