Created
April 21, 2021 16:35
-
-
Save NekitoSP/051b917ecd60a92b9a06b16ff5d53790 to your computer and use it in GitHub Desktop.
Webpack Dev Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"watch": "webpack serve --config webpack.dev.config.js", | |
"build": "webpack --config webpack.prod.config.js", | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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