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

Symfony 5.4 Webpack Encore server dev

I have a problem with Symfony 5.4 and WebPack yet. when I want to run the npm run dev-server this one tells me: [webpack-dev-server] Project is running at: [webpack-dev-server] Loopback: http://localhost:3000/, http://127.0.0.1:3000/
Arthas
  • 41
  • 5
1
vote
0 answers

Webpack 5: DevServer does not trigger recompile when files change despite HMR connecting successfully

Webpack version webpack: 5.65.0 webpack-cli: 4.9.1 webpack-dev-server 4.7.1 Hi all, I am pretty new to coding and trying to set up a monolithic application using React on the Frontend and Hanami (a Ruby framework) on the Backend. I wanted to use…
1
vote
1 answer

React-Webpack-production build is not working on nginx

i am using webpack 5.64.1 in react application . after i run command "npm run build". i get build folder in my project. i uploaded all files from build folder to /usr/share/nginx/html/ here is my nginx configuration file server { listen …
1
vote
1 answer

Webpack warning in ReactJs

Can anyone please explain, why I am getting this warning after npm start ? Here's my package.json { "name": "rou-lesson", "version": "0.1.0", "private": true, "dependencies": { "@testing-library/jest-dom": "^5.16.1", …
Brojan
  • 15
  • 1
  • 3
1
vote
1 answer

Webpack proxying to a proxy

I have the following scenario: I am currently using a browser extension to access company resources via a proxy server (proxy.company.co.uk:3128) for any url that ends with company.co.uk, but I now need my webpack dev server to be able to access…
1
vote
0 answers

Rewriter proxy URL with serve URL on webpack-dev-server

I am using "webpack": "^5.58.2" and "webpack-dev-server": "^4.3.1" on a WordPress theme development project. every thing is going good except one issue, I am using proxy to watch url (example.test) on server url (localhost:8080) here is my dev…
Kabir Uddin
  • 61
  • 2
  • 7
1
vote
0 answers

Angular serve proxy configuration to different servers on dev depending on URL param

We have an Angular 12 app with a proxy.conf.js file used with ng serve --proxy-config proxy.conf.js in order to proxy the API calls to the local back-end server. While we're working on new features for which the back-end is not yet ready, I would…
AsGoodAsItGets
  • 2,886
  • 34
  • 49
1
vote
0 answers

Webpack 4 Child compilation failed: Module parse failed: Unexpected character '�' (1:0)

this is my first time using Webpack and I have a problem with it. I get error message ERROR in Error: Child compilation failed: Module parse failed: Unexpected character '�' (1:0) when I put image tag src in this way. I add a period before the…
1
vote
0 answers

webpack-dev-server inconsistencies when migrating from v3 to v4

After upgrading webpack-dev-server from v3 to v4, I found two odd inconsistencies. webpack-dev-server publicPath does not work anymore, without pairing it with the new static option. In the past, this was enough to make things work: { // ... …
Domi
  • 22,151
  • 15
  • 92
  • 122
1
vote
1 answer

404 when fetching image with webpack

I'm following this link to add images to my bundle: https://webpack.js.org/guides/asset-management/ I have the following files structure in my root folder: index.html index.js images folder (with svg's) This is my webpack.config.js // Generated…
Ace
  • 831
  • 2
  • 8
  • 28
1
vote
0 answers

use babel-loader and less-loader together some include not working

Description when i only use babel-loader or no less file import webpack is normal. but when i import less the include in babel-loader is not working or set the include in modules.rules[0] is throw Error Webpack Config module: { rules: [{ …
acexxx
  • 11
  • 1
1
vote
0 answers

Webpack Dev Server with react & SSR

I'm trying to build a dev server with webpack-dev-server using our own SSR architecture. This means our bundle compiles the react, and the server uses React.RenderToStaticMarkup to generate the HTML string. This is my webpack-dev-server config: …
1
vote
1 answer

Can't get webpack dev server connected to ddev host from web container

I try to run an webpack dev server on my ddev web container and get it connected to my host system, so I can reach the URL in my web browser. But I just get an 502: Unresponsive/broken ddev back-end site. What I want: start my ddev container with…
Raidri
  • 55
  • 1
  • 7
1
vote
0 answers

Configuring React Router 5 with Webpack not working

I'm trying to create web pack build for react application my configuration looks like below. But when I tried to run the build file in .net application. Router components are not working. I tried these solutions which is already available, still not…
1
vote
0 answers

Is it possible to resolve modules differently per entry in Webpack?

Currently, we're using the same code base for two front-end environments that both have different entry points. This allows us to easily share code between the environments. However, we would like to share some code that imports files based on the…
Maarten
  • 23
  • 4