Questions tagged [webpack-dev-middleware]

handles latest webpack output in memory for Express (node platform) web server (so it is an Express middleware)

Supports Hot Module Reload (HMR).

Used by webpack-dev-server internally (webpack-dev-server is a complete preconfigured Express server distribution)

https://github.com/webpack/webpack-dev-middleware

103 questions
0
votes
2 answers

Angular 15 sourceMap webpack-dev-middleware: unexpected token | in JSON at position 3

I updated angular from 9 to 15 and now it seems I have issues running ng s with source Map enabled. My Error: ✔ Browser application bundle generation complete. [webpack-dev-middleware] HookWebpackError: Unexpected token | in JSON at position…
scy
  • 179
  • 1
  • 9
0
votes
0 answers

IIS 10.0 __webpack_hmr working on local ip, not on domain

I have webpack with HMR. While I run app from local IP, page connect with http://192.168.0.123:12345/__webpack_hmr. But when I run form my temp domain https://exampledomain.com/__webpack_hmr page is loading, but return 502. All page is wornkig on…
0
votes
1 answer

Webpack5 prevent fallback packages from being resolved when config is required in application

In Webpack 5, polyfill of core node modules are removed, instead required packages are required to listed in resolve.fallback property. Below is resolve property of webpack.config.client.js file. resolve: { fallback: { path:…
ringord
  • 908
  • 3
  • 11
  • 27
0
votes
1 answer

webpack-dev-middleware can't Hot Reload on route's path

I'm putting webpack-dev-middleware on my express route which points to /login with this: (async () => { const [ {default: webpack}, {default: webpackMW}, {default: webpackHMR}, {default:…
0
votes
1 answer

Webpack: Cannot get index.html with express server middleware

I followed the official getting started instructions of webpack to setup a litte test project and config file. As they recommend, I use an express server with webpack middleware. The setup server.js: const express = require('express'); const webpack…
0
votes
2 answers

Webpack: Trigger a file watch recompile on an unchanged file

I'm developing a Webpack 5 plugin and I need to manually trigger a recompile on a watched file without modifying it (mainly to do some niche HMR stuff). I figure the easiest way is to convince the compiler that the file has changed. I don't want to…
0
votes
1 answer

Browser will not Launch on npm start with webpack Related to webpack-dev-middleware@3.7.2 and webpack@^4.0.0 Peer Dependency Issue?

I am brand new to JavaScript. In an attempt to learn JavaScript, I cloned the webpack-starter project from GitHub (https://github.com/wbkd/webpack-starter). Then, I ran a npm install in the clone folder on my desktop, and then I ran a npm audit fix…
0
votes
1 answer

Bundle created by webpack does not reflect changes on the browser after successful compilation

I am running a very very simple code of mern stack. I am using webpack-dev-middleware and webpack-hot-middleware. The problem is when I run node server.js, compilation works without error but I don't see any change I make on my client side code on…
0
votes
2 answers

Running Aurelia CLI Typescript (Webpack) app in ExpressJS webpack-dev-middleware

I'm trying to get the following setup to work: Standard Aurelia "Hello World" Typescript app (created by CLI, build by Webpack) Served by an ExpressJS app using webpack-dev-middleware Everything combined in one project in order to be able to share…
Will
  • 86
  • 7
0
votes
0 answers

Webpack-dev-server handle proxy header

I have an issue with webpack-dev-server when it proxys to my prod env. The production server sends me 'set-cookie' header but it is an array and I don't see it in dev-server's response in the browser. Also, when I debug I see a lot of headers…
0
votes
2 answers

WebpackOptionsValidationError Invalid Configuration webpack(config)

I'm building a base webserver that I plan on using for future projects. I'm setting up a full javascript stack. I'm using Express, Webpack, and Babel. The issue is that in setting up hmr through Express the configuration file has been running into…
0
votes
0 answers

ExpressJS: 404 error webpack-dev-middleware

Recently I faced a following issue: I'm using expressJS framework for some backend stuff and webpack-dev-middleware for compiling assets during development, seems that dev-middleware is doing its stuff - compiling css and js, because I see some…
alexfsx
  • 125
  • 2
  • 10
0
votes
1 answer

Using constant/variable as webpack dev server proxy URL pattern

In our development server setup we use webpack-dev-server proxy setting to connect ot the APIs via middleware server. Time to time we have to change the middleware server settings and without changing the information in multiple places we would like…
Ishan Hettiarachchi
  • 1,426
  • 2
  • 19
  • 31
0
votes
0 answers

How to Configure WebpackDevServer to run an app with ASP.NET CORE 2.0 IISEXPRESS

Using the ASP.NET Core 2.0 template for creating react app with redux i want to use the webpack-dev-server which is used in the react CRA (CREATE REACT APP) . The ASP.NET Core 2.0 app build outputs to a js (Client/Server) file and renders it on a…
0
votes
1 answer

Webpack hot module doesn't refresh the browser

Hello I want to use webpack with express and webpack-dev-middleware and hot module replacement. I am getting the message below but the browser wont refresh no matter what. I have been stuck on this for days so if anyone can help me that would be…
pap
  • 115
  • 15