1 Star 1 Fork 0

夕空/vite-vant-CLI

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vite.config.js 763 Bytes
一键复制 编辑 原始数据 按行查看 历史
夕空 提交于 2024-03-02 06:57 . update vite.config.js.
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
import legacy from '@vitejs/plugin-legacy';
import Components from 'unplugin-vue-components/vite';
import { VantResolver } from "@vant/auto-import-resolver";
// https://vitejs.dev/config/
export default {
server: {
port: 4000, //指定端口号
host: '0.0.0.0', //可局域网IP访问
open: true,
},
plugins: [
vue(),
Components({
resolvers: [VantResolver()],
}),
legacy({
targets: ['Chrome 69'],//兼容配置
modernPolyfills: true,
}),
],
base: '',//路径
build: {
rollupOptions: {
input: {
main: resolve(__dirname, 'index.html'),
// nested: resolve(__dirname, 'nested/index.html')
}
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/flashme/vite-vant-cli.git
git@gitee.com:flashme/vite-vant-cli.git
flashme
vite-vant-cli
vite-vant-CLI
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385