forked from orcatechteam/react-neuropsych-trails
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
37 lines (36 loc) · 1001 Bytes
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const path = require('path');
const webpack = require('webpack');
module.exports = {
context: path.resolve(__dirname),
entry: {
'react-neuropsych-trails': path.join(__dirname, 'src/index.jsx'),
'create/main': path.join(__dirname, 'src/create_main.jsx'),
'test/main': path.join(__dirname, 'src/test_main.jsx'),
},
output: {
filename: '[name].js',
path: path.join(__dirname, 'dist'),
library: '[name]',
libraryTarget: 'umd'
},
resolve: {
modules: ['node_modules', 'src'],
extensions: ['.js', '.jsx'],
symlinks: false,
},
module: {
loaders: [{
test: /\.(js|jsx)$/,
include: /src/,
exclude: /node_modules/,
loader: 'babel-loader'
}]
},
plugins: [
// ensure that we get a production build of any dependencies
// this is primarily for React, where this removes 179KB from the bundle
// new webpack.DefinePlugin({
// 'process.env.NODE_ENV': '"production"'
//}),
]
};