Skip to content

chore: do not publish src to npm#7689

Open
gameroman wants to merge 2 commits intoueberdosis:mainfrom
gameroman:npmignore
Open

chore: do not publish src to npm#7689
gameroman wants to merge 2 commits intoueberdosis:mainfrom
gameroman:npmignore

Conversation

@gameroman
Copy link
Copy Markdown

@gameroman gameroman commented Apr 2, 2026

Changes Overview

Stop publishing src/ to npm

Implementation Approach

Testing Done

Verification Steps

Additional Notes

The src/ directory should not be published to npm. It increases install size for no reason

Checklist

  • I have created a changeset for this PR if necessary.
  • My changes do not break the library.
  • I have added tests where applicable.
  • I have followed the project guidelines.
  • I have fixed any lint issues.

Related Issues

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 2, 2026

🦋 Changeset detected

Latest commit: f71ab8c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 72 packages
Name Type
@tiptap/core Patch
@tiptap/extension-audio Patch
@tiptap/extension-blockquote Patch
@tiptap/extension-bold Patch
@tiptap/extension-bubble-menu Patch
@tiptap/extension-bullet-list Patch
@tiptap/extension-code-block-lowlight Patch
@tiptap/extension-code-block Patch
@tiptap/extension-code Patch
@tiptap/extension-collaboration-caret Patch
@tiptap/extension-collaboration Patch
@tiptap/extension-color Patch
@tiptap/extension-details Patch
@tiptap/extension-document Patch
@tiptap/extension-drag-handle-react Patch
@tiptap/extension-drag-handle-vue-2 Patch
@tiptap/extension-drag-handle-vue-3 Patch
@tiptap/extension-character-count Patch
@tiptap/extension-dropcursor Patch
@tiptap/extension-focus Patch
@tiptap/extension-gapcursor Patch
@tiptap/extension-history Patch
@tiptap/extension-list-item Patch
@tiptap/extension-list-keymap Patch
@tiptap/extension-placeholder Patch
@tiptap/extension-table-cell Patch
@tiptap/extension-table-header Patch
@tiptap/extension-table-row Patch
@tiptap/extension-task-item Patch
@tiptap/extension-task-list Patch
@tiptap/extension-drag-handle Patch
@tiptap/extension-emoji Patch
@tiptap/extension-file-handler Patch
@tiptap/extension-floating-menu Patch
@tiptap/extension-hard-break Patch
@tiptap/extension-heading Patch
@tiptap/extension-highlight Patch
@tiptap/extension-horizontal-rule Patch
@tiptap/extension-image Patch
@tiptap/extension-invisible-characters Patch
@tiptap/extension-italic Patch
@tiptap/extension-link Patch
@tiptap/extension-list Patch
@tiptap/extension-mathematics Patch
@tiptap/extension-mention Patch
@tiptap/extension-node-range Patch
@tiptap/extension-paragraph Patch
@tiptap/extension-strike Patch
@tiptap/extension-subscript Patch
@tiptap/extension-superscript Patch
@tiptap/extension-table-of-contents Patch
@tiptap/extension-table Patch
@tiptap/extension-text-align Patch
@tiptap/extension-text-style Patch
@tiptap/extension-text Patch
@tiptap/extension-twitch Patch
@tiptap/extension-typography Patch
@tiptap/extension-underline Patch
@tiptap/extension-unique-id Patch
@tiptap/extension-youtube Patch
@tiptap/extensions Patch
@tiptap/html Patch
@tiptap/markdown Patch
@tiptap/react Patch
@tiptap/starter-kit Patch
@tiptap/static-renderer Patch
@tiptap/suggestion Patch
@tiptap/vue-2 Patch
@tiptap/vue-3 Patch
@tiptap/extension-ordered-list Patch
@tiptap/extension-font-family Patch
@tiptap/pm Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 2, 2026

Deploy Preview for tiptap-embed ready!

Name Link
🔨 Latest commit f71ab8c
🔍 Latest deploy log https://app.netlify.com/projects/tiptap-embed/deploys/69ce4c72cca56e0008ceced6
😎 Deploy Preview https://deploy-preview-7689--tiptap-embed.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@gameroman gameroman changed the title fix: do not publish src to npm chore: do not publish src to npm Apr 2, 2026
@bdbch
Copy link
Copy Markdown
Member

bdbch commented Apr 2, 2026

I’m not sure yet if we actually want to remove the published source files. I get the package-size argument, but having src/ available in the package is also pretty useful for debugging, inspecting internals, and even LLM/editor workflows that look directly in node_modules. This probably wouldn’t break most users, but it does remove some real ergonomics for advanced ones. Do we have a strong reason to optimize this away, or evidence that the size win is worth that tradeoff?

@gameroman
Copy link
Copy Markdown
Author

having src/ available in the package is also pretty useful for debugging

Source maps, i.e. .js.map files that are already there, provide everything needed for debugging

inspecting internals

If someone actually needs to look at the source files, it is better to look at github and docs

This probably wouldn’t break most users, but it does remove some real ergonomics for advanced ones

Most users don't need source files in their dependencies and it is rare that someone looks at node_modules instead of github or docs

Do we have a strong reason to optimize this away, or evidence that the size win is worth that tradeoff?

For @tiptap/core for example, this would decrease the install size by 25-30%

@bdbch
Copy link
Copy Markdown
Member

bdbch commented Apr 2, 2026

I get where you’re coming from, but I still think the tradeoff is worth calling out clearly.

  1. The saved size is not noticeable in any bundled app, because src/ is never what gets consumed there. This is only an npm package/install footprint win.
  2. The main benefit of shipping src/ is that you can open the exact installed version and read the real code immediately, without going through GitHub, finding the matching tag/version, and jumping around there.
  3. I don’t think we know yet how meaningful this win is for users in practice. For @tiptap/core, the current unpacked package is about 2.33 MB, and src/ is about 426 KB of that. So it is a real reduction, but it is not a bundle/runtime reduction, and sourcemaps are already a much larger part of the package than src/ is.

So I’m not against it outright, I just think we should frame it accurately: smaller installed package size, but less inspectability in node_modules.

I will discuss this internally on what we want to achieve here, I don't have a strong opinion because it comes down to what our end users prefer / like. (Smaller installed package size vs. local inspectability)

@gameroman
Copy link
Copy Markdown
Author

smaller installed package size, but less inspectability in node_modules

Yes, that is correct 👍

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.

2 participants