Skip to content

Conversation

@mejo-
Copy link
Member

@mejo- mejo- commented Feb 22, 2023

📝 Summary

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

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests
  • Documentation (README or documentation) has been updated or is not required

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]>
Copy three small helper functions into our source code instead of
dependencing on this old and abandonned module.

Signed-off-by: Jonas <[email protected]>
@mejo- mejo- added this to the Nextcloud 26 milestone Feb 22, 2023
@mejo-
Copy link
Member Author

mejo- commented Feb 22, 2023

Mh, the Cypress failure looks unrelated 🤔

@cypress
Copy link

cypress bot commented Feb 22, 2023

Passing run #8677 ↗︎

0 135 0 0 Flakiness 0

Details:

Vite/rollup: treat modules from deep imports as external
Project: Text Commit: a466ba8959
Status: Passed Duration: 03:33 💡
Started: Feb 22, 2023 4:20 PM Ended: Feb 22, 2023 4:24 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@max-nextcloud
Copy link
Collaborator

/compile

Signed-off-by: nextcloud-command <[email protected]>
@mejo- mejo- merged commit 913417c into main Feb 22, 2023
@delete-merged-branch delete-merged-branch bot deleted the fix/vite_prosemirror_bundling branch February 22, 2023 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix npm package and new release

4 participants