50 Star 621 Fork 181

同名自定义/tmui design

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vite.config.ts 1.20 KB
一键复制 编辑 原始数据 按行查看 历史
import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";
import vueJsx from "@vitejs/plugin-vue-jsx";
import { resolve } from "path"
import Components from "unplugin-vue-components/vite"
export default defineConfig({
define: {
__VUE_I18N_FULL_INSTALL__: true,
__VUE_I18N_LEGACY_API__: true,
__VUE_I18N_PROD_DEVTOOLS__: false,
},
build: {
target: "es6"
},
css: {
preprocessorOptions: {
scss: {
api: 'modern-compiler',
silenceDeprecations: ['legacy-js-api']
}
}
},
resolve: {
alias: [
{
find: "@",
replacement: resolve(__dirname, 'src')
}
]
},
server: {
port: 1314,
// 选项写法
proxy: {
'/pag': {
target: 'https://cdn.tmui.design',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '/api')
},
}
},
plugins: [
uni(),
vueJsx(),
Components({
dts: true,
resolvers: [
// example of importing Vant
(componentName) => {
if (componentName.startsWith('tm')) {
return { name: componentName.slice(2), from: 'tm' }
}
},
],
dirs: ['./src/uni_modules/tm-ui/components'],
include: [/\.vue$/, /\.uvue$/]
})
]
});
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/LYTB/tmui-design.git
git@gitee.com:LYTB/tmui-design.git
LYTB
tmui-design
tmui design
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385