Instantly share code, notes, and snippets.

Embed
What would you like to do?
webpack.config.js
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: './src/js/app.ts',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/dist'
},
module: {
rules: [
{
enforce: 'pre',
test: /\.tsx?$/,
loader: 'tslint-loader',
exclude: /node_modules/,
options: {
failOnHint: true,
configuration: require('./tslint.json')
}
},
{
test: /\.css$/,
use: [
'style-loader',
'css-loader'
],
exclude: /node_modules/
},
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/
}
]
},
resolve: {
extensions: [".tsx", ".ts", ".js"]
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
// ...
})
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment