mirror of https://github.com/nextcloud/bookmarks
Use webpack code splitting
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
parent
30fa51b459
commit
3db5ab3125
|
@ -1,5 +1,9 @@
|
|||
module.exports = {
|
||||
extends: [
|
||||
'@nextcloud'
|
||||
]
|
||||
'@nextcloud',
|
||||
],
|
||||
globals: {
|
||||
__webpack_public_path__: true,
|
||||
__webpack_nonce__: true,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -11,8 +11,15 @@
|
|||
<script>
|
||||
import { mutations } from './store/'
|
||||
import { showError, showMessage } from '@nextcloud/dialogs'
|
||||
import { generateFilePath } from '@nextcloud/router'
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import '@nextcloud/dialogs/styles/toast.scss'
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_public_path__ = generateFilePath('bookmarks', '', 'js/')
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
computed: {
|
||||
|
|
|
@ -6,11 +6,12 @@
|
|||
|
||||
import Vue from 'vue'
|
||||
import Router from 'vue-router'
|
||||
import ViewPrivate from './components/ViewPrivate'
|
||||
import ViewPublic from './components/ViewPublic'
|
||||
import ViewBookmarklet from './components/ViewBookmarklet'
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
|
||||
const ViewPrivate = () => import(/* webpackPreload: true */ './components/ViewPrivate')
|
||||
const ViewPublic = () => import(/* webpackPreload: true */'./components/ViewPublic')
|
||||
const ViewBookmarklet = () => import(/* webpackPreload: true */'./components/ViewBookmarklet')
|
||||
|
||||
Vue.use(Router)
|
||||
|
||||
export const privateRoutes = {
|
||||
|
|
Loading…
Reference in New Issue