summaryrefslogtreecommitdiff
path: root/webpack.config.js
blob: 646834b0987a23175a32c07f3086079cf6484fd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const path = require('path');

module.exports = {
  entry: './src/lib.ts',
  module: {
    rules: [
      {
        test: /\.ts?$/,
        use: 'ts-loader',
        exclude: /node_modules/,
      },
    ],
  },
  resolve: {
    extensions: ['.tsx', '.ts', '.js'],
  },
  output: {
    filename: 'lib.js',
    library: {
      type: 'commonjs'
    },
    path: path.resolve(__dirname, 'dist'),
    clean: true
  }
};