-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
42 lines (41 loc) · 1.09 KB
/
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
const path = require("path");
const webpack = require("webpack");
module.exports = {
context: path.resolve(__dirname, "./src"),
entry: {
contact: "./contact",
abandon_survey: "./abandon-survey.js",
success_survey: "./success-survey.js",
general_survey: "./general-survey.js",
cloud_login: "./cloud-login.js",
embedding_code: "./embedding-code",
},
output: {
path: path.resolve(__dirname, "./js"),
filename: "[name].bundle.js",
},
module: {
rules: [
{
test: /\.(js|jsx|ts|tsx)$/,
exclude: /(node_modules|bower_components)/,
loader: "babel-loader",
},
],
},
resolve: {
modules: [path.resolve(__dirname, "src"), "node_modules"],
extensions: [".json", ".js", ".jsx", ".ts", ".tsx"],
alias: {
"@apps": path.resolve(__dirname, "src/apps"),
"@components": path.resolve(__dirname, "src/components"),
},
},
plugins: [new webpack.HotModuleReplacementPlugin()],
// devtool: "cheap-module-source-map",
devtool: "inline-source-map",
devServer: {
// static: "./dist",
hot: true,
},
};