-
Notifications
You must be signed in to change notification settings - Fork 123
How to add module to disallowedModules? #1036
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
Comments
Can you please provide more information why ignoreModules doesn't achieve what you want?
Here's a test that successfully ignores dns
|
I've added
so it seems at least one of them is still being included |
Actually, now that I look at the Temporal source code, there is no logic there to actually exclude module. It only adds a warning if it is not already excluded. |
It seems that it attempts to exclude it using |
LMK if removing the |
It does not, as explained in that webpack issue. |
I have no control over |
The issue you are facing is not directly about Would it be possible for you to ignore the module that does import that |
That's what I am trying to do with Anyway, overriding externals does the job. // @see https://github.com/temporalio/sdk-typescript/issues/1036#issuecomment-1405322953
config.externals = {
"node:crypto": "{}"
}; |
A Temporal-compatible patch: const temporalExternals = config.externals;
config.externals = async (context, callback) => {
if (context.request === 'node:crypto') {
return 'var {}';
}
return temporalExternals(context, callback);
};
config.resolve.alias = {
...config.resolve.alias,
'@': path.resolve(__dirname, '../..'),
slonik: false,
}; |
We need to exclude a module from being bundled.
Contrary to the documentation,
ignoreModules
does not achieve that.The text was updated successfully, but these errors were encountered: