107 Star 1.5K Fork 363

ICEGL / icegl-three-vue-tres

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.fes.js 2.26 KB
一键复制 编辑 原始数据 按行查看 历史
地虎降天龙 提交于 2024-05-31 13:16 . 优化 和 修复 bug
/*
* @Description:
* @Version: 1.668
* @Autor: 地虎降天龙
* @Date: 2023-10-16 10:53:09
* @LastEditors: 地虎降天龙
* @LastEditTime: 2024-05-31 11:45:58
*/
// import { resolve } from 'path';
import { join } from 'path'
import { defineBuildConfig } from '@fesjs/fes'
import { templateCompilerOptions } from '@tresjs/core'
// eslint-disable-next-line import/no-unresolved
import UnoCSS from 'unocss/vite'
// eslint-disable-next-line import/no-extraneous-dependencies
import glsl from 'vite-plugin-glsl'
const timeStamp = new Date().getTime()
const combinedIsCustomElement = (tag) => {
return tag.startsWith('iconify-icon') || templateCompilerOptions.template.compilerOptions.isCustomElement(tag)
}
export default defineBuildConfig({
title: 'TvT.js',
publicPath: './',
access: {
roles: {
admin: ['*'],
manager: ['/'],
},
},
layout: {
navigation: null,
},
enums: {
status: [
['0', '无效的'],
['1', '有效的'],
],
},
//add by 地虎降天龙
viteVuePlugin: {
template: {
compilerOptions: {
isCustomElement: (tag) => combinedIsCustomElement(tag),
},
},
},
viteOption: {
base: './', // ./ /icegl-three-vue-tres/
plugins: [
UnoCSS({
/* options */
}),
glsl(),
],
build: {
rollupOptions: {
output: {
chunkFileNames: `js/[name].[hash]${timeStamp}.js`,
entryFileNames: `js/[name].[hash]${timeStamp}.js`,
assetFileNames: `[ext]/[name].[hash]${timeStamp}.[ext]`,
},
},
},
// 全局 css 注册
css: {
preprocessorOptions: {
scss: {
javascriptEnabled: true,
additionalData: `@import "src/plugins/goView/lib/scss/style.scss";`,
},
},
},
server: {
host: '0.0.0.0',
},
},
alias: { PLS: join(__dirname, './src/plugins') },
// { find: 'pls', replacement: resolve(__dirname, './src/plugins') },
// { '@': join(__dirname, '/src') }
})
1
https://gitee.com/ice-gl/icegl-three-vue-tres.git
git@gitee.com:ice-gl/icegl-three-vue-tres.git
ice-gl
icegl-three-vue-tres
icegl-three-vue-tres
master

搜索帮助