How to alias slicemachine

Hey,

I'll start with a problem:
We have a setup with a nx.dev monorepo approach, where our folder structure for slices is apps/frontend/slices I want to move apps/frontend/slices/ to separate lib libs/slices, but I need to keep the same naming convention in sm.json, it seems it's not possible, so I needed to come up with workaround not to couple this (left module.json & index proxy in apps/frontend/slices & moved components to libs/slices).

Is there a better way to solve this?

Hi @anton2, thanks for reaching out.

I haven't used NX before, and I will check with my team if they have any suggestions. And I will keep this thread open in case if somebody in the community has better solutions.

Hey there Anton, Fares is out of the office, so I'll be taking over the conversation.

Which technology are you using? From what I can see in the official nx.dev site, they support many React frameworks, including Next, which supports Slice Machine :ok_hand:.

There is still no fixed clause that indicates how much the arrangement of these elements can be changed. Therefore changing the order of these folders is not recommended, as it might prevent Slice Machine to run correctly.

When creating or modifying components, Slice Machine scans this structure to find matching folders so that the changes can be easily written to the filesystem. This is why it is important to respect the structure of the directories.

Hello, Pau,

I've already figured it out, it works for now.

Thanks

1 Like

I'm glad to hear that you were able to resolve this promptly!
If it is possible, could you share with us how you solved it? This type of information is valuable to other developers who may find themselves in the same case.

Thanks!

1 Like

This thread has been closed due to inactivity. Flag to reopen.