forked from BowlingX/flexcss
/
webpack.config.js
44 lines (44 loc) · 1.23 KB
/
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
38
39
40
41
42
43
44
var path = require("path");
var webpack = require("webpack");
module.exports = {
watch: false,
devtool: "source-map",
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel-loader?optional=runtime&sourceMap=inline'
}
],
preLoaders: [
{
test: /\.js$/,
exclude: /node_modules/, // exclude any and all files in the node_modules folder
loader: "jshint-loader"
}
]
},
resolve: {
// add bower components and main source to resolved
root: [path.join(__dirname, "bower_components"),
path.join(__dirname, 'src/main')]
},
entry: {
'form': ['modules/Form'],
'modal': ['modules/Modal'],
'flexcss': ['modules/All']
},
output: {
filename: '[name].min.js',
libraryTarget: 'umd',
library: 'FlexCss',
sourceMapFilename: '[name].min.map'
},
plugins: [
new webpack.ResolverPlugin(
new webpack.ResolverPlugin.DirectoryDescriptionFilePlugin("bower.json", ["main"])
),
new webpack.optimize.UglifyJsPlugin()
]
};