-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.dist.js
executable file
·66 lines (64 loc) · 1.8 KB
/
webpack.dist.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/* jshint node:true */
var path = require("path"),
ExtractTextPlugin = require("extract-text-webpack-plugin"),
webpack = require("webpack"),
CommonsPlugin = new require("webpack/lib/optimize/CommonsChunkPlugin");
/**
*
* This webpack config is for transpiling and running unit tests
*
*/
module.exports = {
plugins: [
// new webpack.optimize.UglifyJsPlugin(),
new ExtractTextPlugin("[name].css"),
// new CommonsPlugin({
// name: "common"
// })
],
// Component entries will be built dynamically
entry: {
},
progress: true,
output: {
path: path.join(__dirname, "dist"),
filename: "[name].js",
libraryTarget: "umd",
umdNamedDefine: true,
library: "rizzo-next"
},
module: {
noParse: /node_modules\/(jquery|keymirror)/,
loaders: [{
test: /(\.jsx?)$/,
loader: "babel",
// Excluding everything EXCEPT rizzo-next and flamsteed
exclude: /node_modules\/(?!rizzo|flamsteed).*/,
query: {
"plugins": ["transform-decorators-legacy"],
"presets": ["es2015", "react"]
}
},
{
test: /\.scss$/,
loader: ExtractTextPlugin.extract("style-loader", "css-loader!autoprefixer-loader?browsers=last 3 version" +
"!sass-loader?outputStyle=expanded&" +
"includePaths[]=" + path.resolve(__dirname, "./node_modules"))
},
{
test: /\.hbs$/,
loader: "handlebars?rootRelative=" + path.join(__dirname, "src") + "/" +
"&runtime=" + require.resolve("handlebars/dist/handlebars.runtime")
},
{
test: /picker(.date)?.js$/,
loader: "imports?define=>false"
}, {
test: /sinon(.*)?\.js$/,
loader: "imports?define=>false"
}, {
test: /\.json$/,
loader: "json"
}]
}
};