5.0.1 • Published 5 years ago
webpack-config-typescript v5.0.1
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 = require('path')
const webpackTs = require('webpack-config-typescript')
let config = {
entry: path.join(__dirname, 'src/handler.ts'), // <- your entry file
target: 'node', // <- For Lambdas
output: {
filename: 'deploy/handler.js', // <- output file
libraryTarget: 'commonjs2', // <- output library type
path: path.join(__dirname)
}
}
config = webpackTs.ts(config) // <- Here is where it gets configured
module.exports = config
webpack
- Your src should now be linted, transpiled, and bundled
License
5.0.1
5 years ago
5.0.0
5 years ago
4.0.4
5 years ago
4.0.3
6 years ago
4.0.2
6 years ago
4.0.1
6 years ago
4.0.0
6 years ago
1.0.8
6 years ago
1.0.7
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago