-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.build.js
More file actions
39 lines (38 loc) · 878 Bytes
/
Copy pathwebpack.config.build.js
File metadata and controls
39 lines (38 loc) · 878 Bytes
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
const path = require("path");
const DtsBundleWebpack = require("dts-bundle-webpack");
module.exports = {
devServer: {
contentBase: "./",
compress: true,
hot: true,
port: 3000,
publicPath: "/",
},
entry: path.join(__dirname, "/src/main.ts"),
output: {
filename: "dist/index.js",
path: __dirname,
library: "norma",
libraryTarget: "umd",
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: "ts-loader",
exclude: /node_modules/,
},
],
},
resolve: {
extensions: [".tsx", ".ts", ".js"],
},
plugins: [
new DtsBundleWebpack({
name: 'norma',
main: 'dist/main.d.ts',
out: 'index.d.ts',
removeSource: true
})
],
};