-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwebpack.common.js
More file actions
36 lines (35 loc) · 1.03 KB
/
webpack.common.js
File metadata and controls
36 lines (35 loc) · 1.03 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
const path = require("path");
module.exports = {
entry: {
app: "./src/index.ts",
},
output: {
filename: "chordproject-parser.bundle.js", // Use dynamic naming for better caching
path: path.resolve(__dirname, "dist"),
library: {
name: "ChordProjectParser",
type: "umd", // Modern library target
},
clean: true, // Automatically clean the output directory (replaces CleanWebpackPlugin in Webpack 5+)
},
module: {
rules: [
{
test: /\.tsx?$/,
use: {
loader: "ts-loader",
options: {
transpileOnly: true, // Desactiva las verificaciones de tipo
},
},
exclude: /node_modules/,
},
],
},
resolve: {
extensions: [".tsx", ".ts", ".js"], // Resolve these extensions
},
externals: {
jquery: "jQuery", // Mark jQuery as an external dependency
},
};