🔧 (vite) migrate to vite (#7)
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
import { serviceWorkerBusEvent } from '@/bus/serviceWorkerEventBus'
|
||||
import { register } from 'register-service-worker'
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
register(`${process.env.BASE_URL}service-worker.js`, {
|
||||
if (import.meta.env.NODE_ENV === 'production') {
|
||||
register(`${import.meta.env.BASE_URL}service-worker.js`, {
|
||||
ready() {
|
||||
console.log(
|
||||
'App is being served from cache by a service worker.\n' +
|
||||
|
||||
@@ -6,8 +6,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||
{
|
||||
path: '/repo-list',
|
||||
name: 'RepoList',
|
||||
component: () =>
|
||||
import(/* webpackChunkName: "repo-list" */ '@/views/RepoList.vue')
|
||||
component: () => import('@/views/RepoList.vue')
|
||||
},
|
||||
{
|
||||
path: '/:user?/:repo?',
|
||||
@@ -19,56 +18,45 @@ const routes: Array<RouteRecordRaw> = [
|
||||
path: '/:user/:repo/share/:note',
|
||||
name: 'ShareNotes',
|
||||
props: true,
|
||||
component: () =>
|
||||
import(/* webpackChunkName: "share-notes" */ '@/views/ShareNotes.vue')
|
||||
component: () => import('@/views/ShareNotes.vue')
|
||||
},
|
||||
{
|
||||
path: '/:user/:repo/inbox',
|
||||
name: 'FleetingNotes',
|
||||
props: true,
|
||||
component: () =>
|
||||
import(/* webpackChunkName: "inbox" */ '@/views/FleetingNotes.vue')
|
||||
component: () => import('@/views/FleetingNotes.vue')
|
||||
},
|
||||
{
|
||||
path: '/:user/:repo/draft',
|
||||
name: 'DraftNotes',
|
||||
props: true,
|
||||
component: () =>
|
||||
import(/* webpackChunkName: "draft-notes" */ '@/views/DraftNotes.vue')
|
||||
component: () => import('@/views/DraftNotes.vue')
|
||||
},
|
||||
{
|
||||
path: '/:user/:repo/history',
|
||||
name: 'HistoricNotes',
|
||||
props: true,
|
||||
component: () =>
|
||||
import(
|
||||
/* webpackChunkName: "historic-notes" */ '@/views/HistoricNotes.vue'
|
||||
)
|
||||
component: () => import('@/views/HistoricNotes.vue')
|
||||
},
|
||||
{
|
||||
path: '/:user/:repo/spaced-repetition',
|
||||
name: 'SpacedRepetitionCard',
|
||||
props: true,
|
||||
component: () =>
|
||||
import(
|
||||
/* webpackChunkName: "spaced-repetition-card" */ '@/views/SpacedRepetitionCard.vue'
|
||||
)
|
||||
component: () => import('@/views/SpacedRepetitionCard.vue')
|
||||
},
|
||||
{
|
||||
path: '/about',
|
||||
name: 'About',
|
||||
component: () =>
|
||||
import(/* webpackChunkName: "about" */ '@/views/AboutApp.vue')
|
||||
component: () => import('@/views/AboutApp.vue')
|
||||
},
|
||||
{
|
||||
path: '/:catchAll(.*)',
|
||||
name: 'SpaceCowboy',
|
||||
component: () =>
|
||||
import(/* webpackChunkName: "space-cowboy" */ '@/views/SpaceCowboy.vue')
|
||||
component: () => import('@/views/SpaceCowboy.vue')
|
||||
}
|
||||
]
|
||||
|
||||
export const router = createRouter({
|
||||
history: createWebHistory(process.env.BASE_URL),
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
routes
|
||||
})
|
||||
|
||||
@@ -26,7 +26,7 @@ $family-primary: 'Courier Prime', monospace;
|
||||
--note-width: 620px;
|
||||
}
|
||||
|
||||
@import '~bulma/bulma.sass';
|
||||
@import '../../node_modules/bulma/bulma.sass';
|
||||
|
||||
html {
|
||||
overflow-y: auto;
|
||||
@@ -41,6 +41,7 @@ body {
|
||||
}
|
||||
|
||||
@media screen and (min-width: 769px) {
|
||||
|
||||
html,
|
||||
body {
|
||||
overflow-y: hidden;
|
||||
@@ -91,6 +92,7 @@ a {
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
||||
html,
|
||||
body {
|
||||
overflow-y: auto;
|
||||
@@ -110,4 +112,4 @@ pre {
|
||||
|
||||
code {
|
||||
font-family: var(--font-family);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user