Compilation fails for svg branch
Closed this issue · 8 comments
Hey, I think this is an isomorphic webpack issue. I noticed that npm start( which does the compilation for the server build) fails for the svg branch. Not exactly sure the issue and was wondering if you can look into that.
I actually figured this out. I feel that, in this branch, with isomorphic tools setup, we shouldn't be using the npm start command that we are using. Instead, we should be running the src/server-entry.js directly, after compiling our webpack production build. This means that we don't actually need to compile webpack.config.server.js. It's not longer needed since we have webpack isomorphic tools. Should I make a pull request for this?
I used the compilation to remove the need to babel-core/register
in prod. It would be nice to use babel cli (i.e. babel src -d compiled
or whatever) rather than webpack, but the server should still start from compiled directory rather than src (babel runs in memory and in prod this takes up alot of memory!)
Hmmm.. I see what you mean... Yea I was actually using babel-register to allow this to happen. But... Have you tried using the babel src -d compiled and then running it from there? Does it work?
the problem we then run into is importing scss and svg on the server. for some reason node-hook gets ignored once the files have been put through babel.
This is a problem i'd love to solve though, i'd much prefer to use babel over webpack as the compiler
i'm getting to the bottom of this : catamphetamine/webpack-isomorphic-tools#113 (comment)
looks like i have to tweak my server code
Interesting. Great that he walked you through the problem as well!
this commit has fixed the bug bfbb4c9
it's been a glorious day. with this commit i've also been able to get rid of the need of using webpack on the server!
4b39535