Logo

Tag: Serverless

How to Bundle Knex with Webpack for Serverless

May 22, 2020
Bundling Knex with Webpack doesn't always play well. In this particular case I was trying to bundle a serverless application with only the runtime dependencies. Since this project was utilizing TypeScript and other tooling and dev-dependencies I definitely did not want to ship all of the node modules. Additionally, most of the 10 module resolution errors I was receiving were for packages I didn't even have installed. In this blog post we'll cover utilizing a Webpack plugin to resolve this build error. I'm still not entirely sure why this error occurs, but judging by GitHub issues it has cropped up several times with individuals sharing different solutions. In order to properly bundle the application with only the required dependencies, I…
Read More
2020 Daniel Lemay. All Rights Reserved.