Skip to content

Instantly share code, notes, and snippets.

@HyunSeob
Created July 9, 2017 10:30
Show Gist options
  • Save HyunSeob/f24056fdf2f15ed938d03d3e8cb14310 to your computer and use it in GitHub Desktop.
Save HyunSeob/f24056fdf2f15ed938d03d3e8cb14310 to your computer and use it in GitHub Desktop.
const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: './src/index.ts',
target: 'node',
output: {
path: path.join(process.cwd(), 'lib'),
filename: 'index.js',
libraryTarget: 'commonjs2',
},
resolve: {
extensions: ['.js', '.ts']
},
externals: ['aws-sdk'],
module: {
rules: [
{
test: /\.ts$/,
enforce: 'pre',
loader: 'tslint-loader',
},
{
test: /\.ts$/,
loader: 'awesome-typescript-loader',
options: {
configFileName: path.join(__dirname, './tsconfig.json'),
cacheDirectory: true,
},
exclude: [/node_modules/],
},
],
},
plugins: [
// new webpack.NoEmitOnErrorsPlugin(),
new webpack.LoaderOptionsPlugin({
minimize: true,
debug: false,
}),
// new webpack.optimize.UglifyJsPlugin({
// compress: { warnings: false },
// output: { comments: false },
// sourceMaps: false,
// }),
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment