forked from hyperledger-iroha/iroha-javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.ts
54 lines (52 loc) · 1.16 KB
/
webpack.config.ts
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
52
53
54
import { join } from "path";
const { camelCase } = require("lodash");
const { TsConfigPathsPlugin, CheckerPlugin } = require("awesome-typescript-loader");
const TypedocWebpackPlugin = require("typedoc-webpack-plugin");
/**
* Update this variable if you change your library name
*/
const libraryName = "irohajs";
export default {
entry: join(__dirname, `src/${libraryName}.ts`),
// Currently cheap-module-source-map is broken https://github.com/webpack/webpack/issues/4176
devtool: "source-map",
output: {
path: join(__dirname, "dist"),
libraryTarget: "umd",
library: camelCase(libraryName),
filename: `${libraryName}.js`
},
resolve: {
extensions: [".ts", ".js"]
},
module: {
rules: [
{
test: /\.ts$/,
use: [
{
loader: "awesome-typescript-loader"
}
]
}
]
},
plugins: [
new CheckerPlugin(),
new TsConfigPathsPlugin(),
new TypedocWebpackPlugin(
{
theme: "minimal",
out: "docs",
target: "es6",
ignoreCompilerErrors: true
},
"src"
)
],
node: {
fs: "empty",
net: "empty",
tls: "empty"
}
};