This commit is contained in:
parent
73d138d8b0
commit
8a850fbe6b
|
@ -60,8 +60,6 @@
|
|||
|
||||
const script = document.createElement('script');
|
||||
script.setAttribute('src', `/assets/${CLIENT_ENTRY}${salt}`);
|
||||
script.setAttribute('async', 'true');
|
||||
script.setAttribute('defer', 'true');
|
||||
script.setAttribute('type', 'module');
|
||||
script.addEventListener('error', async () => {
|
||||
await checkUpdate();
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
/// <reference types="vite/client" />
|
||||
|
||||
interface ImportMetaEnv {
|
||||
readonly VITE_APP_TITLE: string
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"watch": "vite build --watch",
|
||||
"watch": "vite build --watch --mode development",
|
||||
"build": "vite build",
|
||||
"lint": "eslint --quiet 'src/**/*.{ts,vue}'"
|
||||
},
|
||||
|
|
|
@ -3,13 +3,13 @@ import pluginVue from '@vitejs/plugin-vue';
|
|||
import pluginJson5 from './vite.json5';
|
||||
import { defineConfig } from 'vite';
|
||||
|
||||
import locales from '../../locales';
|
||||
import meta from '../../package.json';
|
||||
|
||||
const extensions = ['.ts', '.tsx', '.js', '.jsx', '.mjs', '.json', '.json5', '.svg', '.sass', '.scss', '.css', '.vue'];
|
||||
|
||||
const isProduction = process.env.NODE_ENV === 'production';
|
||||
|
||||
const locales = require('../../locales');
|
||||
const meta = require('../../package.json');
|
||||
|
||||
export default defineConfig(({ command, mode }) => {
|
||||
fs.mkdirSync(__dirname + '/../../built', { recursive: true });
|
||||
fs.writeFileSync(__dirname + '/../../built/meta.json', JSON.stringify({ version: meta.version }), 'utf-8');
|
||||
|
|
Loading…
Reference in New Issue