"Tree-Shaking" support for TipTap
See original GitHub issueIt look like “tiptap-extensions” is load all extensions even i did not use all of them.
import {
BlockquoteNode,
BulletListNode,
HardBreakNode,
HeadingNode,
ImageNode,
ListItemNode,
OrderedListNode,
BoldMark,
ItalicMark,
HistoryExtension,
} from 'tiptap-extensions'
I use only these extensions but in my vendor file, there is “highlight.js” dependency.
It would be nice if we can import only what we use.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:17 (13 by maintainers)
Top Results From Across the Web
"Tree-Shaking" support for TipTap · Issue #16 - GitHub
It look like "tiptap-extensions" is load all extensions even i did not use all of them. import { BlockquoteNode, BulletListNode, ...
Read more >Migration from tiptap v.1 to tiptap v.2 - DEV Community
I hope this guide will help you do the migration and if you have any questions feel free to ask. Top comments (0) ......
Read more >How are you guys keep package sizes down? : r/vuejs - Reddit
In particular, the tree shaking and dynamic imports. But my package sizes are still ... I suspect maybe tiptap or beufy? My package...
Read more >Configuration – Tiptap Editor
Configure the editor This will do the following: bind Tiptap to . element , load the Document , Paragraph and Text extensions,
Read more >Tree Shaking - webpack
Tree shaking is a term commonly used in the JavaScript context for dead-code elimination. It relies on the static structure of ES2015 module...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I mean, you don’t tree shake, you just “support” tree shaking. An example would be… WebPack goes to bundle your code, and it places comments around the modules that weren’t used. Usually putting a comment before the unused module like:
/* unused harmony export <export name> */
Then a minifier, like uglify, removes the unused code during the minification process. You can read a bit more on it here: https://webpack.js.org/guides/tree-shaking/
See the requirements section:
I would have user confirm their Babel setup. Also a relevant article:
https://stackoverflow.com/questions/49160752/what-does-webpack-4-expect-from-a-package-with-sideeffects-false
On Sun, Sep 9, 2018, 1:26 PM Philipp Kühn notifications@github.com wrote: