forked from wiredmax/react-flags
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
48 lines (42 loc) · 851 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
40
41
42
43
44
45
46
47
48
require("webpack");
var path = require("path");
module.exports = {
entry: [
path.resolve("./src/Flag.js")
],
output: {
filename: "react-flags.js",
path: path.resolve("./lib"),
library: "react-flags",
libraryTarget: "umd"
},
module: {
loaders: [
{
test: /\.js$/, loaders: ["babel"],
include: [path.join(__dirname, "src")]
},
// Images.
{test: /\.(png|ico|icns)$/, loader: "url?limit=8192"},
// JSON files (Mostly used for languages).
{test: /\.json$/, loader: "json"},
{test: /\.json5$/, loader: "json5"},
]
},
resolve: {
extensions: ["", ".js"]
},
stats: {
colors: true
},
externals: [
{
"react": {
root: "React",
commonjs2: "react",
commonjs: "react",
amd: "react"
}
}
]
};