formatting
This commit is contained in:
parent
273fb76548
commit
2e9ae4b695
|
@ -1,15 +1,15 @@
|
|||
import { CapacitorConfig } from '@capacitor/cli';
|
||||
import { CapacitorConfig } from "@capacitor/cli";
|
||||
|
||||
const config: CapacitorConfig = {
|
||||
appId: 'org.calckey.app',
|
||||
appName: 'Calckey',
|
||||
webDir: '../../built/_client_dist_',
|
||||
appId: "org.calckey.app",
|
||||
appName: "Calckey",
|
||||
webDir: "../../built/_client_dist_",
|
||||
bundledWebRuntime: false,
|
||||
plugins: {
|
||||
PushNotifications: {
|
||||
presentationOptions: ["badge", "sound", "alert"]
|
||||
}
|
||||
}
|
||||
presentationOptions: ["badge", "sound", "alert"],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
|
|
@ -16,9 +16,11 @@ export const url = $i?.instanceUrl;
|
|||
export const url = address.origin;
|
||||
// #v-endif
|
||||
export const apiUrl = `${url ? url : "http://localhost"}/api`;
|
||||
export const wsUrl = `${url ? url
|
||||
.replace("http://", "ws://")
|
||||
.replace("https://", "wss://") : "ws://localhost"}/streaming`;
|
||||
export const wsUrl = `${
|
||||
url
|
||||
? url.replace("http://", "ws://").replace("https://", "wss://")
|
||||
: "ws://localhost"
|
||||
}/streaming`;
|
||||
export const lang = localStorage.getItem("lang");
|
||||
export const langs = _LANGS_;
|
||||
export const locale = JSON.parse(localStorage.getItem("locale"));
|
||||
|
|
|
@ -12,4 +12,3 @@ declare module "@vue/runtime-core" {
|
|||
$ts: typeof i18n["locale"];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,14 +2,14 @@ import * as fs from "fs";
|
|||
import pluginVue from "@vitejs/plugin-vue";
|
||||
import { defineConfig } from "vite";
|
||||
|
||||
import locales from '../../locales';
|
||||
import { dependencies } from './package.json';
|
||||
import locales from "../../locales";
|
||||
import { dependencies } from "./package.json";
|
||||
|
||||
import meta from '../../package.json';
|
||||
import pluginJson5 from './vite.json5';
|
||||
import viteCompression from 'vite-plugin-compression';
|
||||
import meta from "../../package.json";
|
||||
import pluginJson5 from "./vite.json5";
|
||||
import viteCompression from "vite-plugin-compression";
|
||||
import ConditionalCompile from "vite-plugin-conditional-compiler";
|
||||
import tsconfigPaths from 'vite-tsconfig-paths'
|
||||
import tsconfigPaths from "vite-tsconfig-paths";
|
||||
|
||||
const extensions = [
|
||||
".ts",
|
||||
|
@ -28,7 +28,11 @@ const extensions = [
|
|||
|
||||
export default defineConfig(({ command, mode }) => {
|
||||
fs.mkdirSync(`${__dirname}/../../built`, { recursive: true });
|
||||
fs.writeFileSync(`${__dirname}/../../built/meta.json`, JSON.stringify({ version: meta.version }), 'utf-8');
|
||||
fs.writeFileSync(
|
||||
`${__dirname}/../../built/meta.json`,
|
||||
JSON.stringify({ version: meta.version }),
|
||||
"utf-8",
|
||||
);
|
||||
|
||||
return {
|
||||
base: "/assets/",
|
||||
|
@ -52,9 +56,9 @@ export default defineConfig(({ command, mode }) => {
|
|||
resolve: {
|
||||
extensions,
|
||||
alias: {
|
||||
'@/': `${__dirname}/src/`,
|
||||
'/client-assets/': `${__dirname}/assets/`,
|
||||
'/static-assets/': `${__dirname}/../backend/assets/`,
|
||||
"@/": `${__dirname}/src/`,
|
||||
"/client-assets/": `${__dirname}/assets/`,
|
||||
"/static-assets/": `${__dirname}/../backend/assets/`,
|
||||
},
|
||||
},
|
||||
|
||||
|
@ -74,25 +78,23 @@ export default defineConfig(({ command, mode }) => {
|
|||
},
|
||||
|
||||
build: {
|
||||
target: [
|
||||
'es2017',
|
||||
],
|
||||
manifest: 'manifest.json',
|
||||
target: ["es2017"],
|
||||
manifest: "manifest.json",
|
||||
rollupOptions: {
|
||||
input: {
|
||||
index: 'index.html',
|
||||
app: './src/init.ts',
|
||||
index: "index.html",
|
||||
app: "./src/init.ts",
|
||||
},
|
||||
output: {
|
||||
manualChunks: {
|
||||
vendor: ['vue'],
|
||||
}
|
||||
vendor: ["vue"],
|
||||
},
|
||||
},
|
||||
},
|
||||
cssCodeSplit: true,
|
||||
assetsInlineLimit: 0,
|
||||
outDir: `${__dirname}/../../built/_client_dist_`,
|
||||
assetsDir: '.',
|
||||
assetsDir: ".",
|
||||
emptyOutDir: false,
|
||||
sourcemap: process.env.NODE_ENV === "development",
|
||||
reportCompressedSize: false,
|
||||
|
|
Loading…
Reference in New Issue