Is it possible to use variables while importing a module? I'm trying to dynamically import some module files but when I use variables it doesnt find the file
Works:
await import(`module/lib/module.css`);
await import(`module/lib/module.css`);
Doesn't work:
await import(LIBRARY_ROUTES[library].css);
await import(LIBRARY_ROUTES[library].css);
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
R
Reactiflux
The largest chat community for React professionals