UNPKG

806 BJavaScriptView Raw
1'use strict';
2
3var webpack = require('webpack');
4
5var plugins = [
6 new webpack.optimize.OccurenceOrderPlugin(),
7 new webpack.DefinePlugin({
8 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
9 })
10];
11
12if (process.env.NODE_ENV === 'production') {
13 plugins.push(
14 new webpack.optimize.UglifyJsPlugin({
15 compressor: {
16 screw_ie8: true,
17 warnings: false
18 }
19 })
20 );
21}
22
23module.exports = {
24 module: {
25 loaders: [{
26 test: /\.js$/,
27 loaders: ['babel-loader'],
28 exclude: /node_modules/
29 }]
30 },
31 output: {
32 library: 'react-custom-scrollbars',
33 libraryTarget: 'umd'
34 },
35 plugins: plugins,
36 resolve: {
37 extensions: ['', '.js']
38 }
39};