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

Not able to import ReactFlagsSelect function? #182

Open
sawyen92 opened this issue Jul 3, 2023 · 0 comments
Open

Not able to import ReactFlagsSelect function? #182

sawyen92 opened this issue Jul 3, 2023 · 0 comments

Comments

@sawyen92
Copy link

sawyen92 commented Jul 3, 2023

I made a GoldCalcultor in which I used react-flags-select drop down box. The application works fine. When I use the whole module(import ReactFlagsSelect from "react-flags-select";) and build the code, its size increased to 1.13 MB , which is very big. I further dig down and use specific country codes like this

import { QA, PK, IN, BD, LK, AF, NP, PH, US, GB, SG } from "react-flags-select";

import { default as ReactFlagsSelect } from "react-flags-select"; // In this case it builds upto max size that is 1.13 MB

import { ReactFlagsSelect } from "react-flags-select"; // not recognize as a valid function and warning appear during build

When I used specific country codes my build size decreased to 358k.

During the build, I get the following message export 'ReactFlagsSelect' (imported as 'ReactFlagsSelect') was not found in 'react-flags-select' (possible exports: Ad, Ae, Af, Ag, Ai, Al, Am, Ao, Ar, As, At, Au, Aw, Az, Ba, Bb, Bd, Be, Bf, Bg, Bh, Bi, Bj, Bm, Bo, Br, Bs, Bt, Bw, By, Bz, Ca, Cd, Cf, Cg, Ch, Ci, Ck, Cl, Cm, Cn, Co, Cr, Cu, Cv, Cw, Cy, Cz, De, Dj, Dk, Dm, Do, Dz, Ec, Ee, Eg, Er, Es, Et, Fi, Fj, Fk, Fm, Fo, Fr, Ga, Gb, Gd, Ge, Gg, Gh, Gi, Gl, Gm, Gn, Gq, Gr, Gt, Gu, Gw, Hk, Hn, Hr, Ht, Hu, Id, Ie, Il, Im, In, Io, Iq, Ir, Is, It, Je, Jm, Jo, Jp, Ke, Kg, Kh, Ki, Km, Kn, Kp, Kr, Kw, Ky, Kz, La, Lb, Lc, Li, Lk, Lr, Ls, Lt, Lu, Lv, Ly, Ma, Mc, Md, Me, Mg, Mh, Mk, Ml, Mm, Mn, Mo, Mp, Mq, Mr, Ms, Mt, Mu, Mv, Mw, Mx, My, Mz, Na, Ne, Nf, Ng, Ni, Nl, No, Np, Nr, Nu, Nz, Om, Pa, Pe, Pf, Pg, Ph, Pk, Pl, Pn, Pr, Ps, Pt, Pw, Py, Qa, Ro, Rs, Ru, Rw, Sa, Sb, Sc, Sd, Se, Sg, Si, Sk, Sl, Sm, Sn, So, Sr, Ss, St, Sv, Sx, Sy, Sz, Tc, Td, Tg, Th, Tj, Tk, Tm, Tn, To, Tr, Tt, Tv, Tw, Tz, Ua, Ug, Us, Uy, Uz, Ve, Vi, Vn, Vu, Ws, Ye, Za, Zm, Zw, default)

Is there any way that I can only import ReactFlagsSelect specific function?

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

No branches or pull requests

1 participant