1 Star 0 Fork 0

DrsGithub加速专用/vue-vite-h5

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vite.config.ts 851 Bytes
一键复制 编辑 原始数据 按行查看 历史
LZHD 提交于 2021-06-29 00:09 +08:00 . chore: base config
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import styleImport from 'vite-plugin-style-import';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require('path');
function resolve(dir: string) {
return path.join(__dirname, dir);
}
// https://vitejs.dev/config/
// https://github.com/vitejs/vite/issues/1930 .env
export default defineConfig({
plugins: [
vue(),
styleImport({
libs: [
{
libraryName: 'vant',
esModule: true,
resolveStyle: name => `vant/es/${name}/style`
}
]
})
],
resolve: {
alias: {
'@': resolve('./src'),
'@common': resolve('./src/common'),
'@components': resolve('./src/components'),
'@store': resolve('./src/store'),
'@views': resolve('./src/views')
}
}
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/drs-github-accelerates-dedicated/vue-vite-h5.git
git@gitee.com:drs-github-accelerates-dedicated/vue-vite-h5.git
drs-github-accelerates-dedicated
vue-vite-h5
vue-vite-h5
main

搜索帮助