]> git.wincent.com - hextrapolate.git/blob - webpack.production.config.js
9890b551d7e95c005613f10a518b8cf28126b5cb
[hextrapolate.git] / webpack.production.config.js
1 /**
2  * Copyright 2015-present Greg Hurrell. All rights reserved.
3  * Licensed under the terms of the MIT license.
4  */
5
6 'use strict';
7
8 var path = require('path');
9 var webpack = require('webpack');
10
11 module.exports = {
12   devtool: 'source-map',
13   entry: './src/index',
14   output: {
15     path: path.join(__dirname, 'dist'),
16     filename: 'bundle.js',
17   },
18   plugins: [
19     new webpack.DefinePlugin({
20       'process.env': {
21         NODE_ENV: JSON.stringify('production'),
22       },
23     }),
24     new webpack.optimize.DedupePlugin(),
25     new webpack.optimize.UglifyJsPlugin()
26   ],
27   module: {
28     loaders: [{
29       test: /\.js$/,
30       loaders: ['babel'],
31       include: path.join(__dirname, 'src')
32     }, {
33       test: /\.css$/,
34       loader: 'style-loader!css-loader',
35       include: path.join(__dirname, 'src')
36     }],
37   }
38 };