File tree 2 files changed +22
-8
lines changed
2 files changed +22
-8
lines changed Original file line number Diff line number Diff line change 1
1
// Import our CSS
2
2
import '@/css/app.css' ;
3
+
4
+ // Accept HMR as per: https://vitejs.dev/guide/api-hmr.html
5
+ if ( import . meta. hot ) {
6
+ import . meta. hot . accept ( ( ) => {
7
+ console . log ( "HMR" )
8
+ } ) ;
9
+ }
Original file line number Diff line number Diff line change 1
1
import App from '@/vue/App.vue' ;
2
- import { createApp } from 'vue' ;
2
+ import { createApp } from 'vue' ;
3
3
4
4
// App main
5
5
const main = async ( ) => {
6
- // Create our vue instance
7
- const app = createApp ( App ) ;
8
- // Mount the app
9
- const root = app . mount ( '#app-container' ) ;
6
+ // Create our vue instance
7
+ const app = createApp ( App ) ;
8
+ // Mount the app
9
+ const root = app . mount ( '#app-container' ) ;
10
10
11
- return root ;
11
+ return root ;
12
12
} ;
13
13
14
14
// Execute async function
15
- main ( ) . then ( ( ) => {
16
- console . log ( ) ;
15
+ main ( ) . then ( ( ) => {
16
+ console . log ( ) ;
17
17
} ) ;
18
+
19
+ // Accept HMR as per: https://vitejs.dev/guide/api-hmr.html
20
+ if ( import . meta. hot ) {
21
+ import . meta. hot . accept ( ( ) => {
22
+ console . log ( "HMR" )
23
+ } ) ;
24
+ }
You can’t perform that action at this time.
0 commit comments