How to Add an Import Alias

I am wondering if it is possible to add an alias for when I import components. For example, let’s say I have a library @LibaryName/core. Instead of writing import { Box } from @LibraryName/core I’d like to create an alias (say, UI) and write my import statement as such: `import { Box } from UI.

Is that possible with frontity? If so, how?

Thanks.

Hi @gdmseo

Welcome to the Community!

I don’t think creating an Alias for a module it’s possible (and I wonder why would you want to make that).

Maybe these reference docs about import and export give you some ideas

Tale into account that Frontity is a framework to help you create React apps by using data from a Wordpress installation. So anything that can be done in React and Javascript, can also be done in a Frontity project

Hope this helps