Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vite/rollup: treat modules from deep imports as external #3821

Merged
merged 4 commits into from Feb 22, 2023

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

Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
@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 <nextcloud-command@users.noreply.github.com>
@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
3 participants