-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
51 lines (48 loc) · 1.74 KB
/
webpack.config.js
File metadata and controls
51 lines (48 loc) · 1.74 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
44
45
46
47
48
49
50
51
/*
* Copyright © 2025. Cloud Software Group, Inc.
* This file is subject to the license terms contained
* in the license file that is distributed with this file.
*/
const webpack = require("webpack");
const path = require("path");
const CopyPlugin = require("copy-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin")
const baseConfig = {
//stats: 'verbose',
mode: "development",
entry: './src/main.js',
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js'
},
devtool: "inline-source-map",
module: {
rules: [
{
test: /\.css$/,
use: [MiniCssExtractPlugin.loader,'css-loader'],
},
{
test: /\.(woff|woff2|eot|ttf|otf)$/i,
type: 'asset/inline',
}
]
},
resolve: {
extensions: [".tsx", ".ts", ".js", ".mjs"]
},
plugins: [
new CopyPlugin({ patterns: [{ from: "src" }] }),
new CopyPlugin({ patterns: [{ from: "node_modules/jquery/dist/jquery.min.js", to: "lib" }] }),
new CopyPlugin({ patterns: [{ from: "node_modules/cytoscape/dist/cytoscape.umd.js", to: "lib" }] }),
new CopyPlugin({ patterns: [{ from: "node_modules/cytoscape-context-menus/cytoscape-context-menus.js", to: "lib" }] }),
new CopyPlugin({ patterns: [{ from: "node_modules/cytoscape-dagre/cytoscape-dagre.js", to: "lib" }] }),
new CopyPlugin({ patterns: [{ from: "node_modules/cytoscape-expand-collapse/cytoscape-expand-collapse.js", to: "lib" }] }),
new CopyPlugin({ patterns: [{ from: "node_modules/cytoscape-panzoom/cytoscape-panzoom.js", to: "lib" }] }),
new CopyPlugin({ patterns: [{ from: "node_modules/dagre/dist/dagre.min.js", to: "lib" }] }),
new MiniCssExtractPlugin(),
],
};
module.exports = (env) => {
return baseConfig;
};