File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import Vue from 'vue'
2- import Dashboard from './components/Dashboard.vue'
3-
4- Vue . mixin ( { methods : { t, n } } )
1+ __webpack_nonce__ = btoa ( OC . requestToken ) // eslint-disable-line
2+ __webpack_public_path__ = OC . linkTo ( 'notes' , 'js/' ) // eslint-disable-line
53
64document . addEventListener ( 'DOMContentLoaded' , ( ) => {
7- OCA . Dashboard . register ( 'notes' , ( el ) => {
5+ OCA . Dashboard . register ( 'notes' , async ( el ) => {
6+ const { default : Vue } = await import ( /* webpackChunkName: "dashboard-lazy" */ 'vue' )
7+ const { default : Dashboard } = await import ( /* webpackChunkName: "dashboard-lazy" */ './components/Dashboard.vue' )
8+ Vue . mixin ( { methods : { t, n } } )
89 const View = Vue . extend ( Dashboard )
910 new View ( ) . $mount ( el )
1011 } )
Original file line number Diff line number Diff line change @@ -3,4 +3,14 @@ const path = require('path')
33
44webpackConfig . entry . dashboard = path . join ( __dirname , 'src' , 'dashboard.js' )
55
6+ webpackConfig . optimization = {
7+ splitChunks : {
8+ cacheGroups : {
9+ defaultVendors : {
10+ name : 'commons' ,
11+ }
12+ } ,
13+ } ,
14+ }
15+
616module . exports = webpackConfig
You can’t perform that action at this time.
0 commit comments