Skip to content

Instantly share code, notes, and snippets.

@skiabox
Last active September 18, 2017 00:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skiabox/ed8b16f70644c9f0da6d158100b47b7a to your computer and use it in GitHub Desktop.
Save skiabox/ed8b16f70644c9f0da6d158100b47b7a to your computer and use it in GitHub Desktop.
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