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

Upgrade to webpack v5

Open thomaschaaf opened this issue 4 years ago • 5 comments

webpack 5 has been stable for a while now and we should be able to upgrade without any problems.

thomaschaaf avatar Feb 04 '21 14:02 thomaschaaf

any updates?

Enase avatar Feb 26 '21 18:02 Enase

I don't think serverless-webpack has updated to it yet? Let me know if they do! https://github.com/serverless-heaven/serverless-webpack/releases

jayair avatar Feb 27 '21 22:02 jayair

I posted this issue on serveless-webpack but perhaps it should have been posted here from the start: https://github.com/serverless-heaven/serverless-webpack/issues/693 I was asked to try to use webpack 5, but I think the only way I can try that is to fork serverless-bundle, which I intend to try asap.

When I upgraded my libraries to target ES2020 after upgrading all lambdas to Node 14, all my modules using serverless-bundle failed due to webpack 4 being a strict dependency. The serverless-webpack module on the other hand, has webpack only as a peerDependency >= 3 && <= 6, but serverless-bundle has a strict v4 dependency. Is there any chance serverless-bundle could also facilitate peerDependencies and/or upgrade to webpack 5? As of now, my workaround has been to downgrade all my libraries to ES2019 via tsconfig.json, and while it was somewhat tedious of course, the ES level of my transpiled code has no real impact, but if an external library starts using target ES2020 it would be impossible to use it without webpack 5 being supported.

henhal avatar Mar 01 '21 13:03 henhal

Once this PR is merged, will it be possible to target es6? https://webpack.js.org/blog/2020-10-10-webpack-5-release/#improved-target

vlechemin avatar Mar 26 '21 17:03 vlechemin

August 23,2021, serverless-bundle v5.0.0 uses webpack 5.

lquanx avatar Mar 16 '22 23:03 lquanx