1
1
// We need to import the CSS so that webpack will load it.
2
2
// The MiniCssExtractPlugin is used to separate it out into
3
3
// its own CSS file.
4
- import css from "../css/app.css"
4
+ import css from "../css/app.css" ;
5
5
6
6
// webpack automatically bundles all modules in your
7
7
// entry points. Those entry points can be configured
@@ -10,25 +10,28 @@ import css from "../css/app.css"
10
10
// Import dependencies
11
11
//
12
12
import "phoenix_html" ;
13
- import { Socket } from "phoenix"
14
- import NProgress from "nprogress"
15
- import LiveSocket from "phoenix_live_view"
16
-
17
- let csrfToken = document . querySelector ( "meta[name='csrf-token']" ) . getAttribute ( "content" )
18
- let liveSocket = new LiveSocket ( "/live" , Socket , { params : { _csrf_token : csrfToken } } )
13
+ import { Socket } from "phoenix" ;
14
+ import NProgress from "nprogress" ;
15
+ import LiveSocket from "phoenix_live_view" ;
16
+
17
+ let csrfToken = document
18
+ . querySelector ( "meta[name='csrf-token']" )
19
+ . getAttribute ( "content" ) ;
20
+ let liveSocket = new LiveSocket ( "/live" , Socket , {
21
+ params : { _csrf_token : csrfToken }
22
+ } ) ;
19
23
20
24
// Show progress bar on live navigation and form submits
21
- window . addEventListener ( "phx:page-loading-start" , info => NProgress . start ( ) )
22
- window . addEventListener ( "phx:page-loading-stop" , info => NProgress . done ( ) )
25
+ window . addEventListener ( "phx:page-loading-start" , info => NProgress . start ( ) ) ;
26
+ window . addEventListener ( "phx:page-loading-stop" , info => NProgress . done ( ) ) ;
23
27
24
28
// connect if there are any LiveViews on the page
25
- liveSocket . connect ( )
29
+ liveSocket . connect ( ) ;
26
30
27
31
// expose liveSocket on window for web console debug logs and latency simulation:
28
32
// >> liveSocket.enableDebug()
29
33
// >> liveSocket.enableLatencySim(1000)
30
- window . liveSocket = liveSocket
31
-
34
+ window . liveSocket = liveSocket ;
32
35
33
36
import Vue from "vue" ;
34
37
import VueEditor from "./editor.vue" ;
0 commit comments