HolismHolding / Issues

1 stars 0 forks source link

Barrel from multiple directories #191

Open Nefcanto opened 1 month ago

Nefcanto commented 1 month ago

import { X, Y } from "Module" should search for Common and Role directory.

Nefcanto commented 1 month ago

Based on https://github.com/vitejs/vite/issues/17423 it became clear that this is not possible. Even in Webpack, it was not possible.

The only option remaining is to create a dynamic barrel:

export * from "ModuleCommon"
export * from "ModuleRole"

or

export * from "src/Modules/Module/Common"
export * from "src/Modules/Module/Role"