5.0.1 • Published 5 years ago

webpack-config-typescript v5.0.1

Weekly downloads
22
License
MIT
Repository
github
Last release
5 years ago

webpack-config-typescript

Write as little webpack configuration needed to bundle Lambda functions written in TypeScript.

Usage

  1. Install. This will add a barebones tsconfig and tslingt file into your root folder.
$ npm i webpack-config-typescript -D
$ nano webpack.config.js
  1. 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 
  1. webpack
  2. Your src should now be linted, transpiled, and bundled

License

MIT

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