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

Add minify options

Open jurajmatus opened this issue 2 years ago • 4 comments

Typeorm library cannot function well with minified class names and reports weird errors: https://github.com/typeorm/typeorm/issues/2104

All solutions point to turning the minification off (optimally for specified files only). Would that be possible?

jurajmatus avatar Feb 11 '22 20:02 jurajmatus

The simple solution would be to modify webpack.config.js like this:

new ESBuildMinifyPlugin({
  keepNames: true, // Add this, possibly driven by some config option
  target: esbuildNodeVersion,
}),

jurajmatus avatar Feb 11 '22 20:02 jurajmatus

PR: #296

jurajmatus avatar Mar 04 '22 11:03 jurajmatus

Same with systems using decorators like mongoose/typegoose . I would love to see your PR merged soon :) @ Btw is this really usefull / necessary to minify build ?

olivierto avatar Apr 01 '22 12:04 olivierto

I'm using mongoose/typegoose so I'd love to have this feature :)

pthpv95 avatar Apr 15 '22 09:04 pthpv95