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-dev-server proxy SignalR

Is there a way of using SignalR with webpack-dev-proxy? I think I tried every possible solution but had no success. I am using react-native and for local development, we can use webpack dev server to get around CORS. I didn't specify any transport…
Node.JS
  • 1,042
  • 6
  • 44
  • 114
1
vote
1 answer

How to add inline src to image ( Webpack 5 )

I tried to add a string representation of [src] to an image, but it doesn't work. import React from "react"; import cn from "classnames"; import "./index.scss"; export const PanelItem = (props) => { return (
  • Viktor
    • 13
    • 3
  • 1
    vote
    1 answer

    Configuration error in webpack-dev-server v4 2022

    I'm studying about react with a 2020 online course where the instructor uses webpack to include images and CSS in javascript. However, the webpack appears to have undergone an update from 2020 to 2022. Going from v3 to v4 according to OFFICIAL…
    1
    vote
    0 answers

    "Cannot GET" even though html pages linked while using Webpack?

    I am trying to figure out why I can navigate to about.html, but not back to home (temp.html) in Webpack server. It works without flaw in VSCode Live Server though. I've searched for answers, but nothing is working for me so far...or I simply can't…
    Onga Bonga
    • 13
    • 3
    1
    vote
    0 answers

    Getting full webpack development server output from React development server

    When I create a React application with create-react-app and then run npm run start, React will start its own development server which is based on WDS in the background, and give me the following output: Compiled successfully! You can now view xyz…
    Jez
    • 27,951
    • 32
    • 136
    • 233
    1
    vote
    1 answer

    React with Webpack-5 & Module-Federation, Sharing @mui

    framework: react.js v18 packages: @mui/material v5, @emotion/react v11 apps: theme(host), nav(remote) The remote app(nav) has it's own ThemeProvider(@mui/material) component with primary color set to green(@mui/material/colors), but it only expose…
    1
    vote
    0 answers

    how to run webpack server in both http and https

    i created a dummy private and public key file key.pem and cert.perm and added that to webpack.dev.js and this is my webpack.dev.js const fs = require("fs"); const { merge } = require("webpack-merge"); const common =…
    Pravin Poudel
    • 1,433
    • 3
    • 16
    • 38
    1
    vote
    0 answers

    Access Webpack DevServer from a Webpack plugin

    Is it possible to somehow access the DevServer instance from a Webpack plugin? I would like to send a custom event from the server to the client (e.g. after a specific file change). I saw that this is totally possible with Vite.js, but wonder if…
    medihack
    • 16,045
    • 21
    • 90
    • 134
    1
    vote
    1 answer

    react-app-rewired add writeDisk option on devserver

    I am using react-app-rewired to override my webpack configurations. But I tried to set writeDisk option but it doesn't work. Here is config-overrides.js file const { override, disableChunk, addWebpackResolve, addWebpackAlias } =…
    1
    vote
    0 answers

    get "Cannot GET /" while using webpack-dev-server

    I am using webpack-dev-server to run my little program, but unfortunately I get "Cannot GET /" error with this in colsole: "Failed to load resource: the server responded with a status of 404 (Not Found)". package.json { "name": "boilerplate", …
    Mohsen
    • 11
    • 3
    1
    vote
    0 answers

    webpack dev server is not logging in the console in any browser

    I am using Rust with webpack with npm, every time I run "webpack serve --mode=development", it runs with no errors but when I use console.log in my code, it does not print anything in the browser dev tools and it does not say webpack-dev-server is…
    1
    vote
    1 answer

    Automatic Reload is Not Working in React Js

    I am unable to see any update on my web page. because when I use npm start then it shows compile with one error. and my webpack-dev-server is not working
    1
    vote
    0 answers

    Browser tab freezes when running webpack-dev-server in development mode using remote Module Federation module

    Dependency versions: webpack: 5.73.0 webpack-dev-server: 4.9.2 This occurs when running a host application via webpack-dev-server that consumes micro-apps via ModuleFederationPlugin. Example host config: module.exports = { entry:…
    1
    vote
    0 answers

    Webpack-dev-middleware and webpack-hot-middleware configuration

    I have some conceptual troubles with webpack-dev-middleware and webpack-hot-middleware I have SSR app (react + express), webpack (with clientside and serverside configs). Webpack configs: client.config const config: Configuration = { name:…
    1
    vote
    1 answer

    webpack 5 / webpack-dev-server: how to serve other file then index.html

    When i was using webpack 4 (4.44.1) with webpack-dev-server (3.11.0) i had a setting devServer: { index: 'other_filename.html' } and thanks to that setting dev server was serving that file at / instead of index.html (which is not generated in…
    Cragmorton
    • 153
    • 2
    • 11