Skip to content

Instantly share code, notes, and snippets.

@NekitoSP
Created April 21, 2021 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NekitoSP/051b917ecd60a92b9a06b16ff5d53790 to your computer and use it in GitHub Desktop.
Save NekitoSP/051b917ecd60a92b9a06b16ff5d53790 to your computer and use it in GitHub Desktop.
Webpack Dev Server
{
"scripts": {
"watch": "webpack serve --config webpack.dev.config.js",
"build": "webpack --config webpack.prod.config.js",
}
}
const path = require("path");
const webpack = require('webpack');
const baseConfig = require('./webpack.config');
config = {
...baseConfig,
mode: 'development',
devServer: {
host: '0.0.0.0',
port: 3000,
publicPath: '/',
watchContentBase: true,
compress: true,
},
devtool: 'inline-source-map',
}
module.exports = config;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment