2020-11-22 15:42:17 +00:00
|
|
|
const webpack = require("webpack");
|
|
|
|
const path = require("path");
|
|
|
|
const nodeExternals = require("webpack-node-externals");
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
entry: ["webpack/hot/poll?100", "./src/index.ts"],
|
2020-11-25 21:21:29 +00:00
|
|
|
watch: false,
|
2020-11-22 15:42:17 +00:00
|
|
|
target: "node",
|
|
|
|
externals: [
|
|
|
|
nodeExternals({
|
|
|
|
whitelist: ["webpack/hot/poll?100"]
|
|
|
|
})
|
|
|
|
],
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /.tsx?$/,
|
|
|
|
use: "ts-loader",
|
|
|
|
exclude: /node_modules/
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
mode: "development",
|
|
|
|
resolve: {
|
|
|
|
extensions: [".tsx", ".ts", ".js"]
|
|
|
|
},
|
|
|
|
plugins: [new webpack.HotModuleReplacementPlugin()],
|
|
|
|
output: {
|
|
|
|
path: path.join(__dirname, "dist"),
|
|
|
|
filename: "index.js"
|
|
|
|
}
|
|
|
|
};
|