const { merge } = require("webpack-merge");
const path = require("path");
const baseConfig = require("./webpack.config.js");

module.exports = merge(baseConfig({
    NODE_ENV: "development"
}), {
    devServer: {
        client: {
            logging: "error",
            overlay: true,
            progress: true,
            reconnect: 10
        },
        compress: false,
        host: "0.0.0.0",
        hot: true,
        liveReload: true,
        open: true,
        port: 8000,
        static: {
            directory: path.join(__dirname, '../'),
        },
        watchFiles: ['src/**/*', 'public/**/*']
    },
    mode: 'development'
})