serverless-bundle icon indicating copy to clipboard operation
serverless-bundle copied to clipboard

Option to disable AMD loader

Open Ionut-Milas opened this issue 5 years ago • 2 comments

Hello.

I am using the SendInBlue SDK to send email from SLS function, but I encounter the following issue "Module not found: Error: Cannot resolve module". In the SDK documentation, they say that I should disable the AMD loader in webpack. How do you suggest I should proceed with this, as I cannot add serverless-webpack alongside serverless-bundle. Can support for this issue be added directly in the bundle ?

Best regards.

Ionut-Milas avatar Dec 01 '20 07:12 Ionut-Milas

Hi there, how would the AMD loader be disabled in Webpack?

jayair avatar Jan 03 '21 01:01 jayair

I've ran into this issue too. AMD can be disabled in webpack by setting: amd: false within the config https://webpack.js.org/configuration/other-options/#amd

In my case this package was causing the issue: https://github.com/tyrasd/jxon/blob/master/jxon.js#L27

I'll look into raising a PR to add an optional setting to disable.

ashsmith avatar Mar 03 '22 18:03 ashsmith