DEV Community

Discussion on: JavaScript predictions for 2019 by npm

Collapse
 
seanmclem profile image
Seanmclem

How do you import your library into your web component? By leveraging webpack?

Collapse
 
steveblue profile image
Stephen Belovarich

What exactly do you mean? If the library is distributed as esm, you would just import the methods you need with import. If the library is distributed as commonjs, you require them. A bundler like Webpack, Rollup, Parcel, or SystemJS would be needed to bundle everything together just like any other JavaScript project.