forked from trufflesuite/drizzle-react-components-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.prod.js
36 lines (34 loc) · 886 Bytes
/
webpack.prod.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
const path = require("path");
const UglifyJSPlugin = require("uglifyjs-webpack-plugin");
process.env.BABEL_ENV = "production";
module.exports = {
entry: "./src/index.js",
output: {
filename: "drizzle-react-components-plus.js",
library: "drizzle-react-components-plus",
libraryTarget: "umd",
path: path.resolve(__dirname, "dist")
},
module: {
loaders: [
{
test: /\.(js)$/,
include: path.resolve(__dirname, "src"),
loader: "babel-loader",
options: {
presets: ["react"],
plugins: [
require("babel-plugin-transform-class-properties"),
require("babel-plugin-transform-object-rest-spread")
]
}
}
]
},
plugins: [
new UglifyJSPlugin({
sourceMap: true
})
],
externals: ["drizzle", "drizzle-react", "prop-types", "react", "redux"]
};