-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathwebpack.config.js
More file actions
35 lines (33 loc) · 793 Bytes
/
Copy pathwebpack.config.js
File metadata and controls
35 lines (33 loc) · 793 Bytes
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
'use strict';
var webpack = require('webpack');
module.exports = {
entry: './src/ImageLayout.js',
module: {
loaders: [{
test: /\.js$/,
loaders: ['babel-loader'],
exclude: /node_modules/,
}],
preLoaders: [{
test: /\.js$/,
loaders: ['eslint-loader'],
include: ['./src']
}]
},
output: {
path: __dirname + "/dist",
filename: "ImageLayout.min.js",
library: 'ImageLayout',
libraryTarget: 'umd'
},
externals: {
react: 'react'
},
plugins: [
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin({ minimize: true }),
],
eslint: {
configFile: './.eslintrc'
}
};