mirror of https://github.com/lukechilds/ow.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
793 B
39 lines
793 B
'use strict';
|
|
const path = require('path');
|
|
const webpack = require('webpack');
|
|
const license = require('license-webpack-plugin');
|
|
const AddModuleExportsPlugin = require('add-module-exports-webpack-plugin');
|
|
|
|
module.exports = {
|
|
mode: 'production',
|
|
entry: './source/index.ts',
|
|
target: 'node',
|
|
node: false,
|
|
devtool: 'source-map',
|
|
output: {
|
|
path: path.join(__dirname, 'dist'),
|
|
filename: 'index.js',
|
|
libraryTarget: 'commonjs2'
|
|
},
|
|
resolve: {
|
|
extensions: [
|
|
'.ts',
|
|
'.js'
|
|
]
|
|
},
|
|
plugins: [
|
|
new AddModuleExportsPlugin(),
|
|
new license.LicenseWebpackPlugin({
|
|
excludedPackageTest: packageName => ['webpack'].includes(packageName),
|
|
outputFilename: 'licenses.txt'
|
|
})
|
|
],
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.ts$/,
|
|
loader: 'awesome-typescript-loader'
|
|
}
|
|
]
|
|
}
|
|
};
|
|
|