smart-app alpha 版本

This commit is contained in:
zhuoda
2024-03-10 22:26:32 +08:00
parent d64b769d40
commit 728ddb9a7e
295 changed files with 20261 additions and 1 deletions

37
smart-app/vite.config.js Normal file
View File

@@ -0,0 +1,37 @@
import { resolve } from 'path';
import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
const pathResolve = (dir) => {
return resolve(__dirname, '.', dir);
};
export default defineConfig({
transpileDependencies:['@dcloudio/uni-ui'],
plugins: [
uni(),
],
root: process.cwd(),
resolve: {
alias: [
// 绝对路径重命名:/@/xxxx => src/xxxx
{
find: /\/@\//,
replacement: pathResolve('src') + '/',
},
{
find: /^~/,
replacement: '',
},
],
},
// 发布时删除console
build: {
minify: 'terser',
terserOptions: {
compress: {
drop_console: true,
},
},
},
})