Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk_WS into yangws_ws
This commit is contained in:
commit
1f6427ff21
|
@ -3,6 +3,7 @@ import path from 'path'
|
||||||
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
|
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
|
||||||
import vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue'
|
||||||
import WindiCSS from "vite-plugin-windicss"
|
import WindiCSS from "vite-plugin-windicss"
|
||||||
|
import vitePpt from './src/renderer/src/plugins/vite-ppt'
|
||||||
/*import electron from 'vite-plugin-electron'
|
/*import electron from 'vite-plugin-electron'
|
||||||
plugins: [electron({
|
plugins: [electron({
|
||||||
main: {
|
main: {
|
||||||
|
@ -55,7 +56,7 @@ export default defineConfig({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [vue(), WindiCSS()],
|
plugins: [vue(), WindiCSS(),vitePpt()],
|
||||||
assetsInclude:('**/*.woff', '**/*.woff2', '**/*.ttf'),
|
assetsInclude:('**/*.woff', '**/*.woff2', '**/*.ttf'),
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -95,7 +95,6 @@
|
||||||
"svg-pathdata": "^7.1.0",
|
"svg-pathdata": "^7.1.0",
|
||||||
"tinycolor2": "^1.6.0",
|
"tinycolor2": "^1.6.0",
|
||||||
"tippy.js": "^6.3.7",
|
"tippy.js": "^6.3.7",
|
||||||
"vue": "^3.4.34",
|
|
||||||
"vuedraggable": "^4.1.0"
|
"vuedraggable": "^4.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
/**
|
||||||
|
* @file vitePpt.js
|
||||||
|
* ppt-list 样式配置
|
||||||
|
*/
|
||||||
|
|
||||||
|
export default function vitePpt () {
|
||||||
|
return {
|
||||||
|
name: 'vite-ppt',
|
||||||
|
enforce: 'pre',
|
||||||
|
transform(code, id) {
|
||||||
|
if (id.endsWith('.scss')) {
|
||||||
|
// 使用 @use 代替 @import
|
||||||
|
code = code.replace(/@import\s+["']([^"']+)["'];/g, (match, importPath) => {
|
||||||
|
return `@use "${importPath}" as *;`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return code
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue