Open RoyalHunt opened 4 months ago
I'm having the same issue as you.
same
Also having this issue
I'm struggling with this....
My "workaround" was to update rspack config to use this:
https://rspack.dev/config/resolve#resolvetsconfigconfigfile
So, you point to you app/lib tsconfig file.
I solved it with this workaround in rspack.config.ts
:
export default composePlugins(
withNx(),
withReact(),
withModuleFederation(config, { dts: false }),
(config: any) => {
// Fix to set correct configuration for alias
const newAlias: Record<string, string> = {};
for (const key in config.resolve.alias) {
const newKey = key.replace(/\/\*/g, "");
const newValue = config.resolve.alias[key].replace(/\\\*/g, "");
newAlias[newKey] = newValue;
}
config.resolve.alias = newAlias;
return config;
},
);
Current Behavior
tsconfig.json file:
{ "compilerOptions": { "paths": { "@app/themes/*": ["libs/themes/src/muiThemes/*"] } }, }
it resolves in rspack config as:
resolve: { alias: { '@app/themes/*': 'C:\\Users\\admin\\webApps\\libs\\themes\\src\\muiThemes\\*', }, },
Expected Behavior
tsconfig.json file:
{ "compilerOptions": { "paths": { "@app/themes/*": ["libs/themes/src/muiThemes/*"] } }, }
it should resolve in rspack config as:
{ resolve: { alias: { '@app/themes': 'C:\\Users\\admin\\webApps\\libs\\themes\\src\\muiThemes', }, }, }
GitHub Repo
No response
Steps to Reproduce
Nx Report
Failure Logs
No response
Package Manager Version
10.5.0
Operating System
Additional Information
No response