Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DllReferencePlugin fails when using webpack-dev-server #1037

Closed
HQidea opened this issue Nov 8, 2017 · 9 comments
Closed

DllReferencePlugin fails when using webpack-dev-server #1037

HQidea opened this issue Nov 8, 2017 · 9 comments

Comments

@HQidea
Copy link

HQidea commented Nov 8, 2017

Do you want to request a feature or report a bug?

report a bug

What is the current behavior?

When using DllReferencePlugin with webpack-dev-server or webpack-dev-middleware, it will occurs an error:

Error: ENOENT: no such file or directory, open '/path/to/js/manifest.json'
    at Error (native)

If the current behavior is a bug, please provide the steps to reproduce.

const webpack = require('webpack');
const WebpackDevServer = require('webpack-dev-server');
const config = require('./webpack.config');
const compiler = webpack(config);
const server = new WebpackDevServer(compiler, {});

server.listen(8080, '127.0.0.1', () => {
  console.log('Starting server on http://localhost:' + 8080);
});

and the webpack.config is just from this project's example directory, https://github.com/webpack/webpack/blob/master/examples/explicit-vendor-chunk/webpack.config.js

What is the expected behavior?

run correctly like the code below:

const webpack = require('webpack');
const config = require('./webpack.config');

webpack(config, (err, stats) => {
  process.stdout.write(stats.toString() + "\n");
});  // this runs ok

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.

node version: 6.9.0
webpack version: 3.8.1

@sokra
Copy link
Member

sokra commented Nov 9, 2017

yep, sorry that's not implemented yet.

The problem is that the file is written into the in-memory filesystem, but the other compilation tries to read it from the real filesystem. Maybe we need to overlay the in-memory filesystem on top of the input filesystem.

@jetpack3331
Copy link

@sokra is any solution/workaround for that? I'm having the same problem but when i'm trying to build the production build.

@alexander-akait
Copy link
Member

@jetpack3331 no, you can send a PR

@webpack-bot
Copy link

This issue had no activity for at least three months.

It's subject to automatic issue closing if there is no activity in the next 15 days.

@alexander-akait
Copy link
Member

bump

@webpack-bot
Copy link

Issue was closed because of inactivity.

If you think this is still a valid issue, please file a new issue with additional information.

@alexander-akait
Copy link
Member

I think it can be solved using writeFiles, but let's add tests for this case, keep open

@alexander-akait alexander-akait transferred this issue from webpack/webpack Jun 13, 2021
@alexander-akait alexander-akait transferred this issue from webpack/webpack-dev-server Sep 13, 2021
@alexander-akait
Copy link
Member

Same problem - #861

@alexander-akait
Copy link
Member

Fixed in webpack v5, we split fs into to things inputFileSystem and outputFileSystem, so no problem anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants