Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Vite/rollup: treat modules from deep imports as external
So far we only treated direct imports of modules as external in rollup
(e.g. `import ... from '@tiptap/core'`). Modules where we imported files
directly (e.g. `import ... from '@tiptap/core/dist/index.js'` were not
treated as external and thus bundled into our `dist/index.js`.

With `@tiptap/pm` being introduced as meta-dependency for prosemirror
modules, this led to duplicate instances of prosemirror modules.

Fixes: #3820

Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Feb 22, 2023
commit ef4f9ef8ac8ec3386bdc1dc4f353ef55e76c208e
8 changes: 7 additions & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ export default defineConfig({
formats: ['es'],
},
rollupOptions: {
external: Object.keys(dependencies),
external: [
...Object.keys(dependencies),
/lib0\/.*/,
/markdown-it\/.*/,
/@tiptap\/pm\/.*/,
/vue-material-design-icons\/.*/,
],
output: {
globals: { vue: 'Vue' },
},
Expand Down