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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark @tiptap/react and @tiptap/core as side effect free #2361

Merged
merged 2 commits into from
Jan 11, 2022
Merged

Mark @tiptap/react and @tiptap/core as side effect free #2361

merged 2 commits into from
Jan 11, 2022

Conversation

dcastil
Copy link
Contributor

@dcastil dcastil commented Jan 7, 2022

Hi Tiptap people! 👋

I created a PR directly instead of an issue because the diff is quite small. Feel free to close this if undesired. 😊

As far as I understand, Tiptap doesn't rely on global side effects anywhere within the packages @tiptap/core and @tiptap/react (I didn't check the other packages). I added sideEffects: false to both package.jsons to indicate to app bundlers (primarily webpack and rollup) that unused exports within those packages can be removed safely from the final bundle. That's especially useful for large packages like @tiptap/react and @tiptap/core.

More info: https://webpack.js.org/guides/tree-shaking

@netlify
Copy link

netlify bot commented Jan 7, 2022

✔️ Deploy Preview for tiptap-embed ready!

🔨 Explore the source changes: 47b6ddc

🔍 Inspect the deploy log: https://app.netlify.com/sites/tiptap-embed/deploys/61d813b874608500079f498a

😎 Browse the preview: https://deploy-preview-2361--tiptap-embed.netlify.app

@dcastil dcastil changed the title Add sideEffects property to package.json Mark @tiptap/react and @tiptap/core as side effect free Jan 7, 2022
@philippkuehn
Copy link
Contributor

Thanks! Yeah I think we can do this.

@philippkuehn philippkuehn merged commit e609b2d into ueberdosis:main Jan 11, 2022
@dcastil
Copy link
Contributor Author

dcastil commented Jan 11, 2022

@philippkuehn Let me know whether I should check the other packages as well and add the change there, too. 😊

@dcastil dcastil deleted the dcastil-add-side-effects-flag branch January 11, 2022 09:07
@philippkuehn
Copy link
Contributor

I’ve also added it to the Vue packages ✌️

andrewlu0 pushed a commit to trybaseplate/tiptap that referenced this pull request Oct 20, 2023
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