You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there an easy way to create individual imports for every component in my library?
So instead of doing something like
import { someComp } from 'MyLibrary'
I'd like to do
import someComp from 'MyLibrary/someComp'
I guess the build output would look like something like this:
I already have a folder for each component with an index.js file that exposes it.
I think this would make the bundle size smaller since I won't be importing the whole library in a project where maybe I'd just need a couple of components.
I really don't get Webpack that much so I don't know if what I'm asking is a fairly easy issue or I'm just trying to reinvent the wheel here XD
thanks!
The text was updated successfully, but these errors were encountered:
Hi,
Is there an easy way to create individual imports for every component in my library?
So instead of doing something like
import { someComp } from 'MyLibrary'
I'd like to do
import someComp from 'MyLibrary/someComp'
I guess the build output would look like something like this:
I already have a folder for each component with an
index.js
file that exposes it.I think this would make the bundle size smaller since I won't be importing the whole library in a project where maybe I'd just need a couple of components.
I really don't get Webpack that much so I don't know if what I'm asking is a fairly easy issue or I'm just trying to reinvent the wheel here XD
thanks!
The text was updated successfully, but these errors were encountered: