-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
88 lines (87 loc) · 3.42 KB
/
vite.config.js
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import {defineConfig} from 'vite';
import react from '@vitejs/plugin-react';
import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js';
import {visualizer} from 'rollup-plugin-visualizer';
export default defineConfig({
plugins: [react(), cssInjectedByJsPlugin()],
build: {
lib: {
entry: './src/index.js',
name: 'bookcicle_editor',
fileName: () => `index.js`,
formats: ['es'],
},
rollupOptions: {
plugins: [visualizer()],
external: [
'react',
'react-dom',
'@emotion/react',
'@emotion/styled',
'@mui/material',
"@mui/system",
'@mui/icons-material',
'@mui/material-pigment-css',
'styled-components',
'katex',
'dexie',
// TipTap packages
'@tiptap/core',
'@tiptap/react',
'@tiptap/starter-kit',
'@tiptap/extension-bullet-list',
'@tiptap/extension-character-count',
'@tiptap/extension-code-block',
'@tiptap/extension-code-block-lowlight',
'@tiptap/extension-collaboration',
'@tiptap/extension-collaboration-cursor',
'@tiptap/extension-color',
'@tiptap/extension-document',
'@tiptap/extension-dropcursor',
'@tiptap/extension-focus',
'@tiptap/extension-font-family',
'@tiptap/extension-heading',
'@tiptap/extension-highlight',
'@tiptap/extension-list-keymap',
'@tiptap/extension-horizontal-rule',
'@tiptap/extension-image',
'@tiptap/extension-link',
'@tiptap/extension-ordered-list',
'@tiptap/extension-paragraph',
'@tiptap/extension-placeholder',
'@tiptap/extension-subscript',
'@tiptap/extension-superscript',
'@tiptap/extension-table',
'@tiptap/extension-table-header',
'@tiptap/extension-table-row',
'@tiptap/extension-task-item',
'@tiptap/extension-task-list',
'@tiptap/extension-text-align',
'@tiptap/extension-text-style',
'@tiptap/extension-typography',
'@tiptap/extension-underline',
'@tiptap/pm',
'@tiptap-pro/extension-details',
'@tiptap-pro/extension-details-content',
'@tiptap-pro/extension-details-summary',
'@tiptap-pro/extension-drag-handle',
'@tiptap-pro/extension-drag-handle-react',
'@tiptap-pro/extension-emoji',
'@tiptap-pro/extension-file-handler',
'@tiptap-pro/extension-mathematics',
'@tiptap-pro/extension-node-range',
'@tiptap-pro/extension-table-of-contents',
'@tiptap-pro/extension-unique-id',
'prosemirror-state',
'prosemirror-view',
'tiptap-extension-resize-image'
],
output: {
entryFileNames: 'index.js',
assetFileNames: 'index.[ext]',
format: 'es',
exports: 'named',
},
},
},
});