Skip to content
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

expose Webpack options for disabling "mangle" and/or "minize" #311

Open
meunierfrederic opened this issue May 30, 2022 · 3 comments
Open

Comments

@meunierfrederic
Copy link

Hello,

We encounter troubles when deploying our backend aws lambda functions with v5 since minimize is now mandatory in production mode.
We are using components which access to class names (for instance type-graphql). They are mangled by the minimizer (obfuscating our GraphQL Schema).
In some cases, the mangled class names are not consistent (we have a "monorepo" project for our backend with some workspace inter dependencies).

Is it possible to expose the Webpack "minimize" option (a boolean) to serverless.yml? Or better, the "mangle" (or equivalent) option of the minimizer?

Thanks a lot

@jgwheeler
Copy link

THIS.
I have an API that is now completely broken on deployment after updating dependencies, because the serverless-mysql plugin output gets mangled by the webpack minification. Having opinionated defaults for webpack config is one thing, but having absolutely no way to override is just wrong, unless you want to state up front that the serverless-bundle plugin is only designed for a very narrow range of specific scenarios.

@JacobSiegle
Copy link

JacobSiegle commented Oct 7, 2022

Been a major pain for me also where I needed to role my own custom webpack build solely because packages like https://www.npmjs.com/package/@pdftron/pdfnet-node die due to webpack minification.

Duplicated maybe by -
#286

@fabiosenracorrea
Copy link

fabiosenracorrea commented Aug 10, 2023

5.5 fixes this! I was debudding basically in the dark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants