forked from amazon-connect/amazon-connect-chatjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
44 lines (42 loc) · 1008 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
const path = require("path");
const webpack = require("webpack");
module.exports = {
entry: "./src/index",
mode: "development",
devtool: "source-map",
node: {
global: false
},
output: {
filename: "amazon-connect-chat.js",
path: path.resolve(__dirname, "dist")
},
resolve: {
extensions: [".js"]
},
module: {
rules: [
{
test: /\.(js|mjs|jsx|ts|tsx)$/,
exclude: /node_modules/,
loader: require.resolve("babel-loader"),
options: {
// This is a feature of `babel-loader` for webpack (not Babel itself).
// It enables caching results in ./node_modules/.cache/babel-loader/
// directory for faster rebuilds.
cacheDirectory: true,
// Don't waste time on Gzipping the cache
cacheCompression: false
}
}
]
},
devServer: {
compress: false,
hot: true,
static: {
directory: path.resolve(__dirname, "showcase"),
watch: true
}
}
};