forked from kyo4311/jquery.qqface
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
39 lines (37 loc) · 1010 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
38
39
var path = require('path');
var glob = require('glob');
var webpack = require('webpack');
module.exports = {
entry: (function() {
var entry = {};
glob.sync('./src/jquery.qqface.js').forEach(function(name) {
var key = name.replace('main.js', 'main.min.js');
entry[key] = name;
console.log(__dirname, name);
});
return entry;
})(),
module: {
loaders: [
{
test: /\.html$/,
loader: 'html-loader'
},
{
test: /\.css$/,
loader: 'style!css'
}
]
},
output: {
// libraryTarget: 'amd',
path: __dirname,
filename: '[name]'
},
plugins: [
// new webpack.HotModuleReplacementPlugin(),
// new webpack.NoErrorsPlugin(),
// new ExtractTextPlugin('styles.css')
new webpack.optimize.UglifyJsPlugin()
]
};