iam4x / isomorphic-flux-boilerplate

ES7 Isomorphic Flux/ReactJS Boilerplate
http://isomorphic.iam4x.fr
794 stars 121 forks source link

app.css asset not linking correctly on node v5.6.0 #249

Open mz3 opened 8 years ago

mz3 commented 8 years ago

npm run dev gives a FOUC and the following error in the browser JS console:

GET http://192.168.0.16:3001/assets/undefined 404 (Not Found)

Is there something off with the npm run dev script? Am I missing a global npm dependency?

jbroadice commented 8 years ago

Hey @mz3. I think the error is related to this commit: https://github.com/iam4x/isomorphic-flux-boilerplate/commit/495132109caa3e347c54ad3b4ee666e16ad8f243, in which url-loader is used to handle images/fonts/etc in development mode. It should work that the assets get delivered via JS once Webpack has initialised. At least, that's how it works for me.

As for the FOUC in dev - I think I'm right in saying that this is normal behaviour, and unrelated to the error you mentioned.

Incidentally, @iam4x - I'm wondering if it's possible to have url-loader on the server-side inject the data directly into the src attribute for images, for example? Perhaps by writing the data string in webpack-stats.json? scratches head

utkuturunc commented 8 years ago

Together with this error, I am also getting markup mismatch warning. Using file-loader in dev solves both but then I cannot load fonts from npm modules. I believe 4951321 was done to solve that.

mz3 commented 8 years ago

You're correct; the assets get delivered once all the client side JS runs. The downside is just the inability to test with JS disabled.

I'm still working to understand the boilerplate so I apologize if my notes are vague or outright incorrect.

iam4x commented 8 years ago

Hello guys, I know there's breaking changes with fs module on nodejs5.0.0 haven't tried it yet.

And yes you are right @mz3 it's not possible to test SSR without JS on dev env, would be great to add a command to run boilerplate as production to debug.

dantetwc commented 8 years ago

any update on this?