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
2
votes
2 answers

Gulp webpack-dev-server: callback before bundle is finished

I'm trying to add a callback to the webpack-dev-server module in Gulp. The callback has as a goal to notify users the URL where the dev server is started. The issue is that the callback is invoked before the bundling process finishes. If I add a…
Alan Souza
  • 7,475
  • 10
  • 46
  • 68
1
vote
0 answers

How to fix "ModuleParseError: Module parse failed: Unexpected token (1:4)" about custom config Webpack angular typescript?

This is console log : ModuleParseError: Module parse failed: Unexpected token (1:4) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders…
1
vote
0 answers

Errors started to point to the bundle

For some reason, the error outputs for my React project now point to the bundle and not to my code: Based on the linked post, I added the webpack.config.js file: module.exports = { devtool: '#eval-source-map', }; This did not help. My…
1
vote
1 answer

Webpack Config - how can I compiler file in difference path

I have ./src - it's my source files (index.html, index.ts, style.scss) ./public - my site and compiler files (index.html, bundle.js, style.css) and I wanna build my ./src files index.html into ./public/, my index.ts into…
Igor Biyar
  • 19
  • 4
1
vote
0 answers

Why is Webpack reloading endlessly after first file change?

After upgrading from Angular v11 to Angular v16 and updating all the dependencies to their newest version, the Webpack Dev Server now starts to reload infinitely after the first file change. This issue only happens when running the application from…
1
vote
2 answers

react-scripts start not picking up js changes

I have a react application which I bootstrapped using create-react-app. The application runs in a docker container, and has been deployed in a subdomain. Let's say the domain is http://mycompany.com , then I the react app is at…
1
vote
0 answers

In Chrome Devtool and webpack project, how to go from console stack trace to original source?

I have a webpack/typescript project with source map. My webpack devtool config is eval-source-map. In Chrome devtool > sources, I can clearly see and debug the original source code. However, the error call stacks in the console link to code lines in…
1
vote
1 answer

Vue.js. Error at project start Uncaught TypeError: Cannot read properties of undefined (reading 'e')

I'm new into Vue.js, and I'm running into this error when creating my project. This are the steps I made: Install Vue/cli through cmd npm install @vue/cli Create Vue project. I navigated to the desired folder on Visual Studio terminal, since I…
1
vote
0 answers

webpack-dev-server not showing content in localhost

webpack-dev-server not showing content in localhost. Here are some files and the output screenshots for better understanding, Please help me to find the solution. I have tried many ways to fix it but couldn't find the…
1
vote
1 answer

Webpack dev-server doesn't reload automatically with pug-plugin?

My dev-server doesn't reload automatically after I change the contents of my files. Could you please help me understand, what do I need to change in my config? Here's my code: module.exports = { entry: { index: './src/index.pug', }, …
Juliena
  • 11
  • 1
1
vote
0 answers

Why is my functional component not rendering, when the class component equivalent is rendering?

Update: Changing the @babel/preset-react runtime to "automatic" in the webpack.config.js fixed it. The runtime defaults to "classic" which I have to assume prevents the use of non-legacy react within my setup. I have partially confirmed this by…
1
vote
1 answer

Webpack Configuration: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema

I am trying to setup a webpack configuration for the first time. I am getting the error "Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema" when i run the app. Here is the code…
oladimeji
  • 71
  • 1
  • 10
1
vote
1 answer

How to setup loader for bootstrap for webpack ? or is there any better alternative than webpack?

I am stuck in adding css-loader for my bootstrap to the webpack, help please. My file structure: style.scss // Import all of Bootstrap's CSS @import "~bootstrap/scss/bootstrap"; index.js import React from "react"; import ReactDOM from…
1
vote
1 answer

Using Proxy for API calls with Angular

I am using dot-net for my back-end and angular for my front-end. Until now I used to create both front and back-end separately. Of course I should take care of Cross-origin issue, so the front-end can communicate with back-end. Lately I used the…
Hamid
  • 43
  • 6
1
vote
0 answers

Setup webpack on my basic JS project NO framework

I'm trying to setup webpack on my JS project, but it always flashing errors > code@1.0.0 build > webpack 'Workflows\Code\node_modules\.bin\' is not recognized as an internal or external command, operable program or batch…