1 Star 0 Fork 0

周红伟/electron-solid-unocss-typescript

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
electron.vite.config.ts 1.48 KB
一键复制 编辑 原始数据 按行查看 历史
hwzhou 提交于 2023-04-15 10:21 . feat: :sparkles:add router and i18n support
import { defineConfig, externalizeDepsPlugin } from 'electron-vite';
import { resolve } from 'path';
import unocss from 'unocss/vite';
import AutoImport from 'unplugin-auto-import/vite';
import Icons from 'unplugin-icons/vite';
import Pages from 'vite-plugin-pages';
import solid from 'vite-plugin-solid';
export default defineConfig({
main: {
plugins: [externalizeDepsPlugin()]
},
preload: {
plugins: [externalizeDepsPlugin()]
},
renderer: {
resolve: {
alias: {
'@renderer': resolve('src/renderer/src')
}
},
plugins: [
// https://github.com/antfu/unocss
// see unocss.config.ts for config
// order matters: https://docs.solidjs.com/guides/how-to-guides/styling-in-solid/unocss#import-vite-plugin
unocss(),
// https://github.com/mdx-js/mdx
{
...(await import('@mdx-js/rollup')).default({
jsx: true,
jsxImportSource: 'solid-js',
providerImportSource: 'solid-mdx'
}),
enforce: 'pre'
},
solid(),
// https://github.com/hannoeru/vite-plugin-pages
Pages({
extensions: ['tsx', 'jsx', 'ts', 'js', 'mdx', 'md'],
routeStyle: 'remix'
}),
// https://github.com/antfu/unplugin-auto-import
AutoImport({
imports: ['solid-js'],
dts: 'src/auto-imports.d.ts',
dirs: ['src/stores']
}),
// https://github.com/antfu/unplugin-icons
Icons({
compiler: 'solid'
})
]
}
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhou-hw/electron-solid-unocss-typescript.git
git@gitee.com:zhou-hw/electron-solid-unocss-typescript.git
zhou-hw
electron-solid-unocss-typescript
electron-solid-unocss-typescript
master

搜索帮助