build: simplify tiptap build by setting fixed output filename in vite config

This commit is contained in:
xfy 2026-06-04 16:26:25 +08:00
parent e5ce1580e2
commit cd45ab17de
2 changed files with 1 additions and 3 deletions

View File

@ -15,8 +15,6 @@ highlight-css:
build-editor:
@echo "Building Tiptap editor..."
@cd libs/tiptap-editor && npm install && npx vite build
@mv public/tiptap/editor.iife.js public/tiptap/editor.js 2>/dev/null || true
@mv public/tiptap/editor.iife.js.map public/tiptap/editor.js.map 2>/dev/null || true
@echo "Tiptap editor built."
dev:

View File

@ -8,7 +8,7 @@ export default defineConfig({
lib: {
entry: resolve(__dirname, 'src/index.ts'),
name: 'TiptapEditor',
fileName: 'editor',
fileName: () => 'editor.js',
formats: ['iife'],
},
rollupOptions: {