Skip to content
This repository was archived by the owner on Jul 29, 2019. It is now read-only.

make bundleing with webpack possible #1967

Merged
merged 1 commit into from
Oct 17, 2016
Merged

make bundleing with webpack possible #1967

merged 1 commit into from
Oct 17, 2016

Conversation

mojoaxel
Copy link
Member

I moved the following dependencies from devDependencies to dependencies:

  • emitter-component
  • moment
  • propagating-hammerjs
  • hammerjs
  • keycharm

I use the timeline component in a project. If I include dist/vis-timeline-graph2d.min.js i have the problem that moment and hammerjs are included twice.

So the best way ist to include /vis-timeline-graph2d.js with webpacks babel-loader and let the module-bundler figure out the rest. So I don't want to build my own dist version, but want to resolve the dependencies "on the fly". This is also recessary for things like tree shaking and other fancy stuff.

The only think that has to be changed for that ist to install the needed dependencies together with vis itself. Voila!

I tried it and it works with webpack. The vis code now is only half the size!

@mojoaxel
Copy link
Member Author

this "fixes" #1866

@mojoaxel mojoaxel added this to the v4.17 milestone Sep 4, 2016
@yotamberk
Copy link
Member

Hi @mojoaxel,
Can you fix the conflicts and submit the fix?
I want to add this in =)

@mojoaxel
Copy link
Member Author

Can you fix the conflicts and submit the fix?

done.
@yotamberk Can you please make sure that this fix does not break anything. Thanks!

@yotamberk
Copy link
Member

It seems to be working fine!
I'm merging it =)

@yotamberk yotamberk merged commit 4079d2c into visjs:develop Oct 17, 2016
@mojoaxel
Copy link
Member Author

Yeah!! Thanks!

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

Successfully merging this pull request may close these issues.

2 participants