monkeytype/frontend/webpack/config.dev.js
Christian Fehmer 39eb13b4fa build: fix development mode detection on windows (fehmer) (#4724)
* fix: development mode detection on windows

* fix: development mode detection on windows
2023-10-17 12:41:59 +01:00

35 lines
900 B
JavaScript

const { resolve } = require("path");
const { merge } = require("webpack-merge");
const BASE_CONFIG = require("./config.base");
const ExtraWatchWebpackPlugin = require("extra-watch-webpack-plugin");
const webpack = require("webpack");
require("dotenv").config();
/** @type { import('webpack').Configuration } */
const DEV_CONFIG = {
mode: "development",
devtool: "inline-source-map",
devServer: {
compress: true,
port: 3000,
open: true,
hot: false,
historyApiFallback: true,
client: {
overlay: false,
},
},
plugins: [
new ExtraWatchWebpackPlugin({
dirs: [resolve(__dirname, "../static/html")],
}),
new webpack.DefinePlugin({
BACKEND_URL: JSON.stringify(
process.env.BACKEND_URL || "http://localhost:5005"
),
IS_DEVELOPMENT: JSON.stringify(true),
}),
],
};
module.exports = merge(BASE_CONFIG, DEV_CONFIG);