thunderhub/webpack.development.js
2019-11-02 23:04:07 +01:00

21 lines
632 B
JavaScript

const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const merge = require("webpack-merge");
const nodeExternals = require("webpack-node-externals");
const path = require("path");
const webpack = require("webpack");
const common = require("./webpack.common.js");
module.exports = merge.smart(common, {
devtool: "inline-source-map",
entry: ["webpack/hot/poll?1000", path.join(__dirname, "src/main.ts")],
externals: [
nodeExternals({
whitelist: ["webpack/hot/poll?1000"]
})
],
mode: "development",
plugins: [new CleanWebpackPlugin(), new webpack.HotModuleReplacementPlugin()],
watch: true
});