canihazusername/src/webpack.config.js
2019-02-09 19:09:04 +01:00

34 lines
732 B
JavaScript

const webpack = require('webpack')
const path = require('path')
const DtsBundleWebpack = require('dts-bundle-webpack')
module.exports = {
context: `${__dirname}`,
target: 'node',
entry: [
`./index.ts`,
],
output: {
path: `${__dirname}/../lib`,
filename: 'index.js',
libraryTarget: 'umd',
},
resolve: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
optimization: {
minimize: true,
},
module: {
rules: [{
test: /\.tsx?$/,
loader: 'awesome-typescript-loader'
}, ],
},
plugins: [
new DtsBundleWebpack({
name: 'index',
main: `./lib/index.d.ts`
})
],
}