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

tree shaking #326

Closed
lukesmurray opened this issue Oct 29, 2020 · 6 comments
Closed

tree shaking #326

lukesmurray opened this issue Oct 29, 2020 · 6 comments
Assignees

Comments

@lukesmurray
Copy link
Collaborator

Is it possible to enable tree shaking in this project? Alternatively could the core be imported separately from the rest of the prebuilt plugins. I want to use the core because the plugin api is so much more extensible compared to the api offered by slate but I have to import some large dependencies which I'm not using such as remark.

@zbeyens
Copy link
Member

zbeyens commented Oct 29, 2020

We have a package for the core https://www.npmjs.com/package/@udecode/slate-plugins-core

I'm a bit stuck on packaging all the other plugins as it looks like, in development/test (storybook, jest), I need to build the dependencies (like slate-plugins-core) on each change and that's quite annoying...Still looking for a solution.

You can let me know which plugins you would like as package.

@lukesmurray
Copy link
Collaborator Author

ok got it can pipe be moved to core? just because its pretty convenient if you're using this package.

  const editor = useMemo(() => pipe(createEditor(), ...(withPlugins ?? [])), [
    withPlugins,
  ]);

@zbeyens
Copy link
Member

zbeyens commented Oct 29, 2020

Will do!

@lukesmurray
Copy link
Collaborator Author

feel free to close this if you'd like. I consider my original issue resolved!

@zbeyens zbeyens self-assigned this Oct 31, 2020
@santialbo
Copy link
Collaborator

santialbo commented Nov 23, 2020

I'm also looking forward to this. The build is a bit big right now and includes packages that I'm not using like all the ui libraries. (fabric, tippy, prism).
It also includes the whole lodash library. I think there's some import { x } from "lodash" left that are causing this.

@zbeyens
Copy link
Member

zbeyens commented Nov 28, 2020

See #363

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants