First commit

This commit is contained in:
2023-11-08 16:47:43 -07:00
commit f6ffb10c07
106 changed files with 19802 additions and 0 deletions

50
vite.config.js Normal file
View File

@@ -0,0 +1,50 @@
import path from 'path';
import vue from '@vitejs/plugin-vue';
import { createHtmlPlugin } from 'vite-plugin-html';
process.env.TARGET = process.env.TARGET || 'web';
const isCordova = process.env.TARGET === 'cordova';
const SRC_DIR = path.resolve(__dirname, './src');
const PUBLIC_DIR = path.resolve(__dirname, './public');
const BUILD_DIR = path.resolve(
__dirname,
isCordova ? './cordova/www' : './www',
);
export default async () => {
return {
plugins: [
vue({ template: { compilerOptions: { isCustomElement: (tag) => tag.includes('swiper-') } } }),,
createHtmlPlugin({
minify: false,
inject: {
data: {
TARGET: process.env.TARGET,
},
},
}),
],
root: SRC_DIR,
base: '',
publicDir: PUBLIC_DIR,
build: {
outDir: BUILD_DIR,
assetsInlineLimit: 0,
emptyOutDir: true,
rollupOptions: {
treeshake: false,
},
},
resolve: {
alias: {
'@': SRC_DIR,
},
},
server: {
host: true,
},
};
}