2021-11-29 01:06:34 +01:00
|
|
|
/* jshint -W097 */ // don't warn about "use strict"
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
import path from 'path';
|
|
|
|
import {defineConfig} from 'vite';
|
|
|
|
import vue from '@vitejs/plugin-vue';
|
|
|
|
import vueI18n from '@intlify/vite-plugin-vue-i18n';
|
|
|
|
import {VitePWA} from 'vite-plugin-pwa';
|
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
|
|
|
build: {
|
|
|
|
sourcemap: true,
|
|
|
|
manifest: true
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
vue(),
|
|
|
|
vueI18n({
|
2021-12-04 16:44:11 +01:00
|
|
|
include: path.resolve(__dirname, '**/locale/**'),
|
|
|
|
compositionOnly: true,
|
|
|
|
fullInstall: true
|
2021-11-29 01:06:34 +01:00
|
|
|
}),
|
|
|
|
VitePWA({
|
|
|
|
mode: "production",
|
|
|
|
base: "/",
|
|
|
|
srcDir: "src",
|
|
|
|
filename: "sw.js",
|
|
|
|
includeAssets: [
|
|
|
|
"/favicon.png"
|
|
|
|
],
|
|
|
|
strategies: "injectManifest",
|
|
|
|
workbox: {
|
|
|
|
sourcemap: true
|
|
|
|
},
|
|
|
|
manifest: {
|
|
|
|
name: "Nerv Tales Network",
|
|
|
|
short_name: "NervTN",
|
|
|
|
start_url: "/",
|
|
|
|
display: "standalone",
|
|
|
|
icons: [
|
|
|
|
{
|
|
|
|
src: "icon-192.png",
|
|
|
|
sizes: "192x192",
|
|
|
|
type: "image/png"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
src: "icon-512.png",
|
|
|
|
sizes: "512x512",
|
|
|
|
type: "image/png"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
src: "apple-touch-icon.png",
|
|
|
|
sizes: "512x512",
|
|
|
|
type: "image/png"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
})
|
|
|
|
],
|
|
|
|
server: {
|
|
|
|
strictPort: true,
|
|
|
|
force: true
|
|
|
|
}
|
|
|
|
});
|