-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.config.js
More file actions
43 lines (39 loc) · 1.06 KB
/
dev.config.js
File metadata and controls
43 lines (39 loc) · 1.06 KB
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
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
module.exports = {
mode: "development",
devtool: "eval-source-map",
entry: {
index: "./src/index.js", // Base JS entry
},
output: {
path: path.resolve(__dirname, "dist"), // Everything will be put in the dist folder
filename: "[name].bundle.js", // Entry point bundles will depend on keys in entry object
clean: true, //Cleans out the build folder before build
},
plugins: [
new HtmlWebpackPlugin({
title: "DEV Planager",
favicon: "./src/public/favicon.ico",
}),
],
module: {
rules: [
{
test: /\.css$/i,
use: ["style-loader", "css-loader"],
},
{
test: /\.(woff|woff2|eot|ttf|otf)$/i,
type: "asset/resource",
},
],
},
devServer: {
open: true, // Opens browser automatically
port: 8000, // Port that listens for requests
proxy: {
"/socket.io/*": { target: "ws://0.0.0.0:5000", ws: true }, // Proxy any requests to socket.io to the backend
},
},
};