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.

3256 questions
1
vote
0 answers

Webpack doesn't reload the page entirely like manual refresh when I make a changes in my js file

I'm building a web app and I have an input element with autofocus Whenever I change something in my app.js webpack automatically refresh the page and apply my changes but that doesn't bring autofocus to my input element When I reload the page…
zEn feeLo
  • 1,877
  • 4
  • 25
  • 45
1
vote
0 answers

Electron blank page in dev mode

When my electron app starts, I only see a blank page. The weird thing is, that the code haven't changed. Now, even when switching back to an old commit, the problem occurs. There are no error messages. Neither on the main thread nor on the renderer…
caldicot
  • 195
  • 2
  • 15
1
vote
0 answers

How do I make HeadlessUI compatible with Webpack?

My screen goes blank whenever I uncomment a HeadlessUI component. I receive the following error: 'Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.' After a day of researching, I've come to the conclusion…
Rob
  • 11
  • 1
  • 1
1
vote
0 answers

Running Webpack dev server with multiple exported configurations

There are similar old questions but without any clear solution. The question is as of 2022 does webpack-dev-server support exporting multiple configurations (array)? After bundling, the dist directory will be as follows: dist home index.html …
EEAH
  • 715
  • 4
  • 17
1
vote
1 answer

Webpack 5 Custom Plugin Upgrade

I've inherited a task to upgrade from Webpack 4 to 5 and have the following custom plugin that works with Webpack 4 but obviously doesn't with Webpack 5 due to the change to using hooks. I am pretty new to all this and am struggling to rewrite the…
1
vote
1 answer

Webpack Module Federation react 17.0.2

I am trying to implement Module Federation Plugin in react application. Specified versions in package.json are "webpack": "^5.65.0", "webpack-cli": "^4.9.1", "webpack-dev-server": "^4.7.3" When the server is started in console it shows following…
1
vote
2 answers

Webpack 4, process is not defined

All of a sudden a project that worked fine on webpack 4 now breaks on all browsers while on dev. I am using Node v16.3.0 & npm v8.1.3 The page loads, the terminal gives out no error and it seems to work, the page can be interacted with for a few…
Álvaro
  • 2,255
  • 1
  • 22
  • 48
1
vote
0 answers

How to enable hot module replacement with webpack + browsersync + mamp pro?

I'm currently trying to configure webpack to have browser sync and HMR work with wordpress under mamp pro. Currently my configuration is this, and it's working, except that at this point, I'm quite stuck since I'm using a proxy config to tell…
Luca Reghellin
  • 7,426
  • 12
  • 73
  • 118
1
vote
1 answer

Cannot GET / http://localhost:8080/ for rxjs local setup

Trying to setup my local server in order to run rxjs code Package.json { "name": "rxjs", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" &&…
Gowtham
  • 1,557
  • 12
  • 24
1
vote
1 answer

In Webpack's dev server, how can I use a fallback on proxy error?

I have a Vue.JS project where a customization css is served by the backend. This can be configured using devServer.proxy. When the backend doesn't have a custom css to serve (reutrns 404), is there a way to fallback to serving a static file ? I…
Antoine
  • 13,494
  • 6
  • 40
  • 52
1
vote
2 answers

Webpack Devserver: Open page in browser without typing '.html'

I'm making a plain, static site (HTML/CSS/JS) with Webpack that I intend to eventually deploy to s3. I have my final HTML files exported to the root of my dist folder like, index.html, foo.html, bar.html. When I go to localhost:9000, my index loads…
bill-lamin
  • 343
  • 1
  • 3
  • 19
1
vote
0 answers

Cannot find module 'vue-loader/lib/loaders/pitcher' into webpack electron app

My webpack dev server which need to launch electron app generate this error : Cannot find module 'vue-loader/lib/loaders/pitcher' I installed the next version of vue-loader because I'm in vueJS3 project with : npm install --save-dev…
miltone
  • 4,416
  • 11
  • 42
  • 76
1
vote
0 answers

Angular CLI Proxy: Override existing files

Is it possible to dynamically exchange files with the Angular CLI proxy? I would like to do something like this during ng serve: const PROXY_CONFIG = { "/styles.css": { target: "http://localhost:4200", secure: false, pathRewrite: {…
kremerd
  • 1,496
  • 15
  • 24
1
vote
0 answers

Webpack error when "npm start" on my ReactJS project

I'm trying to learn ReactJS. I just upgraded my dependencies' versions. I was using "npm start" command always for run my server. When I try that code I'm getting an annoying error like "webpack 5.65.0 compiled with 2 errors in 769 ms". I couldn't…
user14098664
1
vote
3 answers

Webpack 5 Dev Server proxy seems to be ignored

Firstly, this worked great in webpack 4. After upgrading to webpack 5, everything seems fine except the dev server proxy. Its like whatever values I put in there are just outright ignored. All I get is the following error Error occured while trying…
Kurtis
  • 1,172
  • 2
  • 12
  • 20