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

webpack-dev-middleware not serving my client

I have a nodejs app on the server-side and a vue app on the client side I want my server side to serve my client when accessing certain urls (for example '/') my client is under project_root/frontend and my server is under project_root/server This…
Tom Klino
  • 2,358
  • 5
  • 35
  • 60
0
votes
1 answer

Using an ES6 module in both an app and in Node, while using Webpack-Dev-Middleware and Express

Background Let's say you have an ES2015/ES6 component with a single function as a default export: component.js export default function() { console.log("Hello, World!"); } An app to include it in: app.js import myComponent from…
0
votes
0 answers

Node 6.11 - Promise not defined

So I cannot for the life of me figure out why one of my developers is getting the following error on her machine? The code works perfectly on my laptop with what would seemingly be the exact same setup. Obviously something must be different, but I…
0
votes
1 answer

WebpackOptionsValidationError with webpack-dev-middleware

I don't know how else to get this resolved besides posting all of the code and I have been pulling my hair out for several hours now. I could not find anything about this but I feel like I am just missing something, like maybe using a newer version…
0
votes
1 answer

Can webpack only print emmited files info while webpack rebuilt?

I have use these package to comply webpack HMR: webpack@2.2.1 webpack-dev-middleware@1.10.1 webpack-hot-middleware@2.17.1 webpack stats config: stats: { assetsSort: 'name', children: false, chunks: false, colors: true, …
0
votes
1 answer

Get bundle from webpack-dev-middleware

I have configured webpack-dev-middleware with sails. The publicPath in webpack configuration is set to /static/. Webpack builds the bundle.js without errors, but it is not available at localhost:3000/static/bundle.js. How do I inject the bundle? Is…
ankit_m
  • 417
  • 2
  • 5
  • 16
0
votes
0 answers

express cannot handle file extensions in URL

I am using express with webpack-dev-middleware and webpack-hot-middleware in my development environment. I build a storage/DFS module that works in a similar way as GitHub. You paste a URL and it opens up a folder or a file. The problem now that I…
puppeteer701
  • 1,225
  • 3
  • 17
  • 33
0
votes
1 answer

How to get --color output when using webpack-dev-middleware?

I have an express API I'm using in my app so I am using webpack-dev-middleware and webpack-hot-middleware. I'm trying to figure out how to get the webpack --color option when I use webpack through the API. This is what I have right now: const…
Brennan Cheung
  • 4,271
  • 4
  • 30
  • 29
0
votes
1 answer

Webpack Dynamic public path?

I have an app which runs express js and angular 2 I am using webpack to bundle my modules and webpack dev middleware to run webpack with express. I have setup express js to have a wildcard route to serve the index.html file however, when I attempt…
0
votes
1 answer

webpack-dev-middleware serving bundle on different port than app

I've been working on a React boilerplate that harnesses Apollo-Client and GraphQL. My app is set up so that I have one node process running an Express server on port 3000 that actually renders the application, and another Express server on port 3001…
Kamaros
  • 4,536
  • 1
  • 24
  • 39
0
votes
1 answer

Webpack is displaying empty pages, but files are being shown in terminal

partially going insane right now. I have been trying to fix this problem for over a week, but still can not seem to fix it. Currently I am trying to make a React application that utilizes React-Router, however I am NOT using Redux or Flux. I took…
0
votes
1 answer

Why am I getting 2 builds with Webpack?

I need to know the hash of the build so I'm trying to capture it in the callback function: const compiler = webpack(webpackConfig, function (err, stats) { debug("Hash", stats.hash) }) But when I'm doing this something weird happens: I'm getting 2…
haxpanel
  • 4,402
  • 4
  • 43
  • 71
-1
votes
1 answer

React-Router with Webpack-Dev-Server setup

New to webpack, I am having trouble setting up correctly using React-Router and Webpack-Dev-Server. The reason why I want to setup this way is to take the advantage of using webpack-hot-middleware to reload the page every time I change something in…
1 2 3 4 5 6
7