christianalfoni / webpack-express-boilerplate

A boilerplate for running a Webpack workflow in Node express
MIT License
1.4k stars 292 forks source link

HMR failing #38

Open tim-field opened 8 years ago

tim-field commented 8 years ago

I'm using this setup in my project, but I'm unable to get a successful build, it seems that HMR isn't working correctly. In the console HMR is timing out by the looks.

image

What does src refer to here? Maybe this is related.
https://github.com/christianalfoni/webpack-express-boilerplate/blob/master/server.js#L18

The only area that I really vary from you setup is having a .bablerc file instead of doing this all in webpack.config.js as I'm using Relay, and Relay needs it's plugin defined in here for some reason.

{
    "env": {
    "development": {
        "passPerPreset": true,
        "presets": [
        {
        "plugins": [
            "./build/babelRelayPlugin"
        ]
        }, "react", "es2015", "stage-0", "react-hmre"],
    },
    "production": {
        "passPerPreset": true,
        "presets": [
        {
        "plugins": [
            "./build/babelRelayPlugin"
        ]
        }, "react", "es2015", "stage-0"],
    }
    }
}
christianalfoni commented 8 years ago

Hm, you got any progress on this? Sorry for late reply. Your files needs to be in src folder yes. There has been some updates to the boilerplate if you want to give it another try :)