Questions tagged [webpack-dev-server]

a Node.js based server that supports live reloading and is used for development of webpack powered applications.

webpack-dev-server is a little Node.js Express server, which uses the webpack-dev-middleware to serve a webpack bundle. It also has a little runtime which is connected to the server via Socket.IO. The server emits information about the compilation state to the client, which reacts to those events by updating the bundle.

The server is used for development purpose only.

2877 questions
63
votes
3 answers

Webpack watch not working on Webstorm on Windows?

So basically I have a project using Webpack, if I build using Webpack -w, editing the file with another editor will trigger the watch; however if I edit the file using Webstorm, nothing will happen. I have came across this post, which seems I'm not…
luanped
  • 2,838
  • 2
  • 21
  • 35
53
votes
10 answers

Webpack launch browser automatically

Gulp + live reload serves up my content on localhost and (here's what I'm after) launches the browser automatically at the server url whenever i run the gulp command (i.e I don't have to click the browser icon and navigate to the url manually). Can…
swelet
  • 7,118
  • 5
  • 27
  • 40
53
votes
4 answers

How to watch index.html using webpack-dev-server and html-webpack-plugin

I am using webpack-dev-server for development with html-webpack-plugin to generated the index.html with revision sources. The thing is every time I change the index.html the bundle system will not rebuild again. I know the index is not in the entry,…
hjl
  • 2,642
  • 2
  • 14
  • 25
53
votes
5 answers

webpack-dev-server does not watch for my file changes

When I change my files while webpack-dev-server is running, the bundle's files are not updated. Here are my webpack.config.js and package.json files, as you can see from my npm script, I've solved running webpack watch and webpack-dev-server in the…
Jurgo Boemo
  • 1,528
  • 1
  • 14
  • 20
52
votes
3 answers

webpack-dev-server Cannot find module 'webpack'

I'm trying to use webpack-dev-server to run a simple program but I'm getting this error: module.js:471 throw err; ^ Error: Cannot find module 'webpack' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load…
yonBav
  • 1,147
  • 1
  • 12
  • 22
50
votes
5 answers

webpack dev server CORS issue

I am using webpack-dev-server v1.10.1 to boost up my Redux project and I have the options below: contentBase: `http://${config.HOST}:${config.PORT}`, quiet: false, noInfo: true, hot: true, inline: true, lazy: false, publicPath:…
Hao
  • 1,120
  • 3
  • 12
  • 20
49
votes
9 answers

How to serve an Angular 2 dist folder index.html

I'm using this angular 4 seed app: https://github.com/2sic/app-tutorial-angular4-hello-dnn It uses webpack and works fine. It only seems to serve the dev files and not the dist/ folder. I want to ng serve the dist folder. Not sure the command to do…
AngularM
  • 13,932
  • 27
  • 78
  • 151
49
votes
5 answers

Webpack-dev-server doesn't generate source maps

I use babel-loader, but can't figure out how to generate or where find source maps for transpiled files. I tried eval-source-map, inline-source-map, source-map. webpack.config.js const BowerWebpackPlugin =…
Matt
  • 6,793
  • 24
  • 89
  • 169
47
votes
1 answer

Do I need webpack-dev-server if I am using a node server like express

I am following some tutorials to build an isomorphic app with express and react. I am confusing with the webpack-dev-server. The webpack tutorial says about the webpack-dev-server: This binds a small express server on localhost:8080 which serves…
Brick Yang
  • 4,878
  • 6
  • 27
  • 43
45
votes
2 answers

How to specify webpack-dev-server webpack.config.js file location

I am starting with webpack. I have been able to specify to webpack the location of webpack.config.js like this: "webpack --config ./App/webpack.config.js" Now I am trying to use the webpack-dev-server with that file also, but I can not find how to…
Mayday
  • 3,482
  • 2
  • 15
  • 44
44
votes
10 answers

webpack.validateSchema is not a function

Webpack are throwing this error all of a sudden: TypeError: webpack.validateSchema is not a function Everything was working fine Friday, not working today. No new commits to master since Friday. Pruned NPM, that didn't work, deleted NPM folder and…
44
votes
12 answers

How to make webpack less verbose?

This is Wes Craven's New Nightmare! Why do I even need this horror on every little bit of change? How can I turn off these notifications?!
Vitalii Korsakov
  • 38,491
  • 18
  • 68
  • 85
43
votes
6 answers

npm run dev fails : ValidationError: Invalid options object

Currently learning Vue js and express js through some tutorials, I am still newbie regarding these technologies. Anyway following the tutorials I am building a small project in which I have a folder "Client" that contains the frontend side of the…
Dhouibi iheb
  • 553
  • 1
  • 3
  • 8
42
votes
12 answers

Error: Cannot find module 'webpack-cli/bin/config-yargs'

'Github' asked me to update 'webpack-dev-server' to version 3.1.11 or higher for security reasons. However, 'npm run dev' will not run after the update. I don't solve this problem Error: Cannot find module 'webpack-cli/bin/config-yargs' The code for…
Sh031224
  • 559
  • 1
  • 3
  • 12
41
votes
4 answers

How to use VS Code debugger with webpack-dev-server (breakpoints ignored)

My problem is simple. I just want to make VS Code's debugger work with webpack-dev-server without ignoring my breakpoints. Now, webpack-dev-server serves the bundled files from memory, while, if I understand this correctly, the VS Code debugger…