-
Notifications
You must be signed in to change notification settings - Fork 9
/
webpack.config.js
37 lines (36 loc) · 1019 Bytes
/
webpack.config.js
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
/* eslint-disable @typescript-eslint/no-var-requires */
const nodeExternals = require("webpack-node-externals");
const CircularDependencyPlugin = require("circular-dependency-plugin");
module.exports = {
entry: "./src/index.ts",
output: {
filename: "index.js",
libraryTarget: "umd",
library: "ninjatrader",
umdNamedDefine: true,
},
resolve: {
extensions: [".ts"],
},
target: "node",
externals: [nodeExternals()],
module: {
rules: [
{
test: /\.tsx?$/,
exclude: /node_modules/,
use: ["awesome-typescript-loader", "eslint-loader"],
},
{ enforce: "pre", test: /\.js$/, loader: "source-map-loader" },
],
},
devtool: "source-map",
plugins: [
new CircularDependencyPlugin({
exclude: /node_modules/,
failOnError: true,
allowAsyncCycles: false,
cwd: process.cwd(),
}),
],
};