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
1 answer

Webpack change properties to devServer

i'm trying to use a plugin in my vuejs project that allows me to create projects in VUE within CMS October, however i updated my node and i believe i updated the webpack version too (from what i've researched) and now my plugin is not working for…
Crazy
  • 346
  • 1
  • 4
  • 17
1
vote
1 answer

I tried to install Pupilfirst LMS

I tried to install Pupilfirst LMS, I had difficulty in step Compile Rescript Code: yarn run re: build Output: Usage Error: could't find a script named "re: build". And I also have difficulty in step Run Webpack Dev Server: yarn run wds Output:…
1
vote
1 answer

Unable to load image using Webpack 5

I'm using webpack 5 to bundle an embeddable widget. I can't seem to load an image created on the fly. const img = document.createElement('img'); img.src = 'assets/doggo.svg'; http://localhost:8080/assets/doggo.svg gives 404 In my webpack.config.js…
lomse
  • 4,045
  • 6
  • 47
  • 68
1
vote
0 answers

webpack-dev-server runs out of memory doing react development in dev container

I am developing a react application inside of a vscode dev container and the development server keeps crashing with the following message: The build failed because the process exited too early. This probably means the system ran out of memory or…
1
vote
1 answer

Hot Module Replacement always full reload

HMR always full reload everytime I change something in index.js. The only clue I got is it has something to do with module.hot.accept(), but I'm new to webpack and reading the very technical docs doesn't help. Here is the details: The warning from…
vietan
  • 126
  • 1
  • 7
1
vote
1 answer

Vue-cli webpack dev server doesnt ignore selected files

I`m trying to ignore all *.html files so that webpack devserver wont reload when the files changes. My config looks like this const path = require('path'); module.exports = { pages: { index: { entry:…
Qba
  • 148
  • 1
  • 7
  • 25
1
vote
0 answers

Problem on Proxying API Requests from react

My backend is developed with .NET and hosted in a local docker container on localhost:8080, and the client side is created with CRA. In package.json file for my react app , i added "proxy": "http://localhost:8080" but this is not working and It is…
Saber
  • 3,811
  • 2
  • 6
  • 11
1
vote
0 answers

Is it posible to cache bundles in Webpack dev server?

I have a large Vue application that is being bundled with Webpack. The bundle time is around 2 minutes, and I have not found a way to improve it much. For development purposes, I am using webpack-dev-middleware and webpack-hot-middleware. I would…
1
vote
1 answer

How do I set webpack mode

I'm trying to configure my script (in package.json) in such a way that I can run webpack in production or development mode via cli. package.json "scripts": { "start": "webpack serve", "build": "webpack --mode=production" in my webpack.config.js…
Wasiu
  • 319
  • 4
  • 13
1
vote
0 answers

Cannot get Error on Page Refresh in production in react

I am getting this error when refresh the page or manually enter url devDependencies": { "@babel/core": "^7.17.8","@babel/preset-env": "^7.16.11","@babel/preset-react": "^7.16.7","babel-core": "^6.26.3", "babel-loader": "^8.2.4",…
asif kaif
  • 159
  • 12
1
vote
1 answer

ENOENT webpack-dev-server esm

I inherited a react project hosted on azure-devops. Cloned local repository Need to downgrade npm and node versions to: npm@6.14.8 node@v14.14.0 After that successfully install modules (npm i) but now I can not run npm start and it's getting me this…
1
vote
1 answer

Vue CLI HMR not working after upgrading to v5

I'm developing a Django+Vue app using VSCode devcontainers (Docker). I have recently migrated from Vue CLI v4 to Vue CLI v5 following the migration guide. After the migration, the HMR of the dev-server stopped working. This was my vue.config.js…
pablolmedorado
  • 1,181
  • 2
  • 8
  • 11
1
vote
0 answers

Can't close webpack application with ctrl + C

I configure my react app with webpack service, after running webpack, i found issues that the web server is still running on the local port, i tries ctrl + C may times but still doesn't work until i killed that port. Here's my webpack.config…
huy trần
  • 11
  • 2
1
vote
0 answers

Unable to start my react application and getting error in webpack server

I don't know where am going wrong Am not sharing all package.json but whatever required am sharing. here is my package.json "scripts": { "develop": "webpack serve --hot --port 8080 --disable-host-check --config webpack.develop.js", …
1
vote
0 answers

Webpack 5 No Polyfills and Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')

My Intial Problem was that webpack 5 doesnt have polyfills so I had to find a way to solve that. I used the second solution on this link to solve that problem: i tried to Polyfill modules in webpack 5 but not working (Reactjs) I did: npm install…