-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
35 lines (34 loc) · 988 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
var webpack = require('webpack');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
entry: {
sharinpix: "./src/sharinpix.coffee",
"sharinpix.min": "./src/sharinpix.coffee",
"demo": "./src/demo.coffee",
"demo.min": "./src/demo.coffee"
},
output: {
path: __dirname,
filename: "dist/[name].js",
libraryTarget: "umd",
library: '[name]'
},
module: {
loaders: [
{ test: /\.coffee$/, loaders: ["babel?presets[]=es2015", "coffee-loader" ] },
{ test: /\.sass$/, loader: ExtractTextPlugin.extract("style-loader", "css!sass") },
{ test: /\.jade$/, loader: "jade"}
]
},
plugins: [
new webpack.optimize.UglifyJsPlugin({ include: /\.min\.js$/ }),
new HtmlWebpackPlugin({ template: './src/index.jade', inject: false }),
new ExtractTextPlugin("dist/[name].css"),
],
node: {
fs: 'empty',
net: 'empty',
tls: 'empty'
}
};