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

base64 encoded output??? #60

Closed
terebentina opened this issue Jan 27, 2016 · 6 comments
Closed

base64 encoded output??? #60

terebentina opened this issue Jan 27, 2016 · 6 comments

Comments

@terebentina
Copy link

I am getting base64 encoded code when using 1.5.0/1.5.1 (with webpack 1 and webpack-hot-middleware). Works just fine with 1.2.0 - 1.4.0.
So, basically, in dev mode, when I go to http://localhost:3000/static/app.js I should see something like

/******/ (function(modules) { // webpackBootstrap
/******/    var parentHotUpdateCallback = this["webpackHotUpdate"];
/******/    this["webpackHotUpdate"] = 
....

instead I get

"LyoqKioqKi8gKGZ1bmN0aW9uKG1vZHVs...
...
...qKiovIF0pOw=="

which is the base64 encoding of the app code.
Any idea what's going on?

@sokra
Copy link
Member

sokra commented Mar 24, 2016

Any idea what's going on?

No idea. Are you using webpack-hot-middleware or webpack-dev-middleware?

@terebentina
Copy link
Author

Both, in a pretty standard way:

if (process.env.NODE_ENV == 'development') {
    const devConfig = require('./webpack.config.dev');
    const testConfig = require('./webpack.config.test');
    const testsCompiler = webpack(testConfig);

    testsCompiler.watch({}, (err) => {
        if (err) {
            return console.log(err);
        }
        console.log('Test file bundled');
    });

    const compiler = webpack(devConfig);
    app.use(require('webpack-dev-middleware')(compiler, {
        noInfo: true,
        publicPath: devConfig.output.publicPath,
        stats: { colors: true },
    }));

    app.use(require('webpack-hot-middleware')(compiler, {
        log: console.log,
        path: '/__webpack_hmr',
        heartbeat: 10 * 1000,
    }));
}

Only non-standard thing is that I am using restify instead of express

@gogoout
Copy link

gogoout commented Apr 1, 2016

+1, same with my restify. Had to change to webpack-dev-server

@0xMarkian
Copy link

Is there any fix on this problem?

@SpaceK33z
Copy link
Member

Do you also have this problem without webpack-hot-middleware?

@SpaceK33z
Copy link
Member

I'm closing this issue because of inactivity. Feel free to comment, and we can always re-open it again.

This looks very much like a webpack-hot-middleware error, but if anyone can provide a simple repo so I can reproduce it I'm willing to help you.

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