forked from lyonbot/onebox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
42 lines (40 loc) · 1.03 KB
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import solidPlugin from 'vite-plugin-solid';
import { VitePWA } from 'vite-plugin-pwa'
import devtools from 'solid-devtools/vite'
import UnoCSS from 'unocss/vite'
import monacoEditorPlugin from 'vite-plugin-monaco-editor';
import { defineConfig } from "vite";
const MonacoPlugin = (monacoEditorPlugin as any).default as typeof monacoEditorPlugin
export default defineConfig({
base: './',
plugins: [
VitePWA({
registerType: 'autoUpdate',
devOptions: {
enabled: true,
},
includeAssets: ['favicon.png'],
manifest: {
name: 'OneBox',
description: 'Draft Notebook for Developers',
theme_color: '#333333',
icons: [{ src: "./favicon.png", sizes: '512x512', type: 'image/png' }],
},
}),
devtools({
autoname: true, // e.g. enable autoname
}),
solidPlugin({}),
UnoCSS(),
MonacoPlugin({}),
],
resolve: {
alias: {
'~/': __dirname + '/src/',
'path': 'path-browserify',
},
},
define: {
'process.cwd': '(()=>"/")',
},
});