@sandeep I totally approve of the solution in your comment above, to compile your src to a dist folder using babel. But one thing to keep in mind here is that this approach does not create a 'bundle' using webpack, rather it compiles individual files.
So if I add a criteria to my question, to pass each file thru webpack loader so that we can start using css-module, for example, on the server side.
- Would using something like
css-modules-require-hook with babel-register make sense?
- Or would it make more sense to create a server specific bundle with webpack? If so, what would the architecture look like?