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

Clarification on some code #120

Open
chopfitzroy opened this issue Mar 22, 2017 · 1 comment
Open

Clarification on some code #120

chopfitzroy opened this issue Mar 22, 2017 · 1 comment

Comments

@chopfitzroy
Copy link

Hey @egoist sorry to be a pain but I am trying to unserstand what you are doing here and can not figure it out at all, could you explain this block:

const mfs = settings.fileSystem;
const file = path.join(dev.output.path, 'index.html');
settings.waitUntilValid();

express proxy
app.get('*', (req, res) => {
    settings.waitUntilValid(() => {
        const html = mfs.readFileSync(file);
        res.end(html);
    });
});

Cheers.

@BojDom
Copy link

BojDom commented Apr 10, 2017

webpack-dev-middleware serve the html page only when the client.js is compiled and is valid

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

2 participants