Skip to content

Loading plugins individually with webpack(er)? #68

Answered by jrochkind
jrochkind asked this question in Q&A
Discussion options

You must be logged in to vote

OK, I figured it out... only cause I started randomly reading closed Issues in this project, and found this one:

#57

So this works!

import TomSelect from 'tom-select/dist/esm/tom-select'; // base
import 'tom-select/dist/esm/plugins/remove_button/plugin'; 

/dist/esm, not ./dist/js. I honestly don't know how I would have figured this out if I hadn't found the exact example. I don't know what esm stands for or how it differs from ./dist/js. . I generally don't understand how I am supposed to figure out the right way/place to import from any npm packages, not just this one, I feel lost every time!

So there could be some things I am just missing here.

But I wonder if there should be docs on h…

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
4 replies
@oyejorge
Comment options

@jrochkind
Comment options

@jrochkind
Comment options

@ryanb
Comment options

Answer selected by oyejorge
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ryanb
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants