-
-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to specify "filePath" for dts generateTypes #2550
Comments
@ScriptedAlchemy: As requested, here the created |
Do you have an idea in the source code about where you would implement this update? |
@YanPes is this not something that publicPath: auto resolves? |
@ScriptedAlchemy I just found the |
Yeah we recently added it since users were not thrilled about needing to know the url upfront at build haha. |
To load the remotes via traefik proxy we need Modern.js to serve the files inside the static folder. function afterFederation(module: string, publicPath: string) {
const assetFolder = `modules/${module}/static/js/`;
const typesFolder = `mf-${module}-types`;
const manifestFile = path.join(
'./',
'/dist/' + assetFolder + 'mf-manifest.json',
);
updateManifestJson(manifestFile, assetFolder, typesFolder, publicPath);
moveTypes(assetFolder, typesFolder, '.zip');
moveTypes(assetFolder, typesFolder, '.d.ts');
} It would be great to have a native integration solving this issue. As requested above the easiest solution would be to have a manual override of the dist path of the generatedTypes defined inside the DTSmanager.ts. generatedTypes: {
typesFolder: 'mf-custom-types',
// new requested field to give more control over the behavior of module federation file orchestration
filePath; 'my/custom/path/'
} |
@YanPes merged |
@ScriptedAlchemy Tested on our side - Works as expected! Thanks to all contributors for your fast action! |
Clear and concise description of the problem
In order to address the generated types of a certain manifest.json file behind a proxy, it is necessary to parse and overwrite the manifest.json fields
metaData.types.zip
andmetaData.types.api
because the default paths of the generated types are not reachable for our use-cases.Currently, we use a custom plugin that is overwriting the variables
afterBuild
to have a valid pointer when calling the manifest.json which is very inconvenient.Suggested solution
The request is to provide more control over the file generation by adding a
filePath
field in thegeneratedTypes
object.Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: