Last active
September 18, 2017 00:00
-
-
Save skiabox/ed8b16f70644c9f0da6d158100b47b7a to your computer and use it in GitHub Desktop.
webpack.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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