-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathwebpack.browser.js
63 lines (62 loc) · 1.19 KB
/
webpack.browser.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
const path = require("path")
const webpack = require("webpack")
module.exports = {
entry: ["./src/heavy-con-es6.js"],
plugins: [
new webpack.ProgressPlugin(),
new webpack.ProvidePlugin({
Buffer: ["buffer", "Buffer"]
}),
new webpack.DefinePlugin({
"process.env": {
BROWSER: JSON.stringify(true)
}
})
],
module: {
rules: [
{
test: /\.js$/,
use: {
loader: "babel-loader"
},
include: /src/
},
{
test: /\.mjs$/,
include: /node_modules/,
type: "javascript/auto"
}
]
},
externals: {
"apache-arrow": {
commonjs: "apache-arrow",
commonjs2: "apache-arrow",
amd: "apache-arrow",
root: "Arrow"
}
},
resolve: {
fallback: {
util: require.resolve("util/"),
url: require.resolve("url/")
}
},
optimization: {
minimize: false
},
output: {
library: {
name: {
// commonjs: "@heavyai/connector",
amd: "@heavyai/connector"
// root: "DbCon"
},
type: "umd"
},
globalObject: "this",
path: path.join(__dirname, "dist"),
filename: "browser-connector.js"
}
}