question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Serve Webpack DLL from Memory?

See original GitHub issue

Our app has become fairly large and I’m trying to reduce the compile time by moving its vendor assets into a DLL. Right now we have it set up so that our .js is proxied through a Django app which serves assets from webpack-dev-server. This works great when everything is a single process and compiled from webpack.config.js and served from memory. However, when trying to setup webpack’s DLL capabilities it requires a second webpack.vendors config to compile out the manifest into a file that sits on the file-system, and then webpack.config reads in that file when it does its thing. Since our app is proxied through Django and we have to use the full webpack-dev-server url (http://localhost:3000/static/) the vendors.js file is lost.

So my question is: is it possible to tell webpack-dev-server that my vendor dll exists and to serve it up in addition to the normal js content that is output from webpack.config.js?

Note: I’m following this example to create the DLL: https://gist.github.com/robertknight/058a194f45e77ff95fcd

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

9reactions
laurentvdcommented, Aug 18, 2016

You can tell it to serve existing files from disk by adding --content-base=./public/ to your webpack-dev-server command. This isn’t obvious though.

0reactions
damassicommented, Jul 28, 2016

Thats a fantastic solution – will close this issue as it seems sufficient for most cases.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add basic webpack DLLPlugin support (experimental) (!18407 ...
Adds the ability to compile a batch of vendor libraries as a DLL for webpack to consume. These libraries are then served from...
Read more >
How to use webpack DLL Plugin? - Stack Overflow
This is a good simple example: We define our functions in vendor.js (this is the library that we are going to reference as...
Read more >
Improve your webpack build with the DLL plugin
This tutorial shows you how to improve build times when working with webpack as a dependency for build tools using the DLL plugin....
Read more >
Build Performance - webpack
The following utilities improve performance by compiling and serving assets in memory rather than writing to disk: webpack-dev-server; webpack-hot-middleware ...
Read more >
Webpack bundling as a service - Medium
My initial approach to creating a DLL bundling service was to manually grab packages from NPM and extract them into memory. There were...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found