webpack-config-typescript
Write as little webpack configuration needed to bundle Lambda functions written in TypeScript.
Usage
- Install. This will add a barebones
tsconfig
andtslingt
file into your root folder.
$ npm i webpack-config-typescript -D
$ nano webpack.config.js
- Wrap your webpack configuration using the exported function
const path = const webpackTs = let config = entry: path // <- your entry file target: 'node' // <- For Lambdas output: filename: 'deploy/handler.js' // <- output file libraryTarget: 'commonjs2' // <- output library type path: path config = webpackTs // <- Here is where it gets configured moduleexports = config
webpack
- Your src should now be linted, transpiled, and bundled