demos: add dependency txt for vite setup

This commit is contained in:
Philipp Kühn 2021-09-20 09:32:17 +02:00
parent 34f40ebfc9
commit 020ddce3df
2 changed files with 31 additions and 23 deletions

View File

@ -0,0 +1,24 @@
d3
lowlight
lowlight/lib/core
prosemirror-commands
prosemirror-dropcursor
prosemirror-gapcursor
prosemirror-history
prosemirror-inputrules
prosemirror-keymap
prosemirror-model
prosemirror-schema-list
prosemirror-state
prosemirror-tables
prosemirror-transform
prosemirror-view
shiki
simplify-js
tippy.js
uuid
y-indexeddb
y-prosemirror
y-webrtc
y-websocket
yjs

View File

@ -12,31 +12,15 @@ import vue from '@vitejs/plugin-vue'
import reactRefresh from '@vitejs/plugin-react-refresh'
// import checker from 'vite-plugin-checker'
const includeDependencies = fs.readFileSync('./includeDependencies.txt')
.toString()
.replace(/\r\n/g, '\n')
.split('\n')
.filter(value => value)
export default defineConfig({
optimizeDeps: {
include: [
'prosemirror-commands',
'prosemirror-inputrules',
'prosemirror-keymap',
'prosemirror-model',
'prosemirror-schema-list',
'prosemirror-state',
'prosemirror-transform',
'prosemirror-view',
'prosemirror-history',
'prosemirror-dropcursor',
'prosemirror-gapcursor',
'prosemirror-tables',
'tippy.js',
'yjs',
'y-prosemirror',
'y-websocket',
'y-indexeddb',
'y-webrtc',
'lowlight',
'lowlight/lib/core',
'shiki',
],
include: includeDependencies,
},
build: {