If I’m not mistaken, it appears hot reload doesn’t work with react from npm (because it adds react-runtime from meteor automatically)?
Marks-MacBook-Air:markshust$ meteor add webpack:react
Changes to your project's package version selections:
jsx added, version 0.2.4
react-meteor-data added, version 0.2.5
react-runtime added, version 0.14.4
react-runtime-dev added, version 0.14.4
react-runtime-prod added, version 0.14.4
webpack:core-config added, version 1.0.0
webpack:react added, version 1.1.0
Possibly the solution might be to publish a NPM version of this without the dependency. That way those on 1.3 using NPM React can continue forward and you avoid issues with those using the atmosphere react.
Wow awesome stuff.
But how is it about testing? Meteor 1.3 is going to have great and easy testing support. Has this package also testing support, is it on the roadmap or is there no testing support at all?
It is already working with Velocity and you could certainly unit test with mocha outside of Meteor. I’m following closely how people are testing with Meteor 1.3 and it is absolutely on the roadmap to make sure everything you can do to test with Meteor 1.3 will work with webpack.
Hey @benoitt, that looks wonderful! Just one question: I understand webpack config files are not exactly super friendly but I was pretty happy with mine using postcss and img-loader… Where would I be able to add my own loaders?
You can use your own custom webpack.config.js file like before. Not a big deal if you really want to customize and already know Webpack.
You can create your own Webpack config package. It’s super easy. Go look at how webpack:less is built.
Can you share your Webpack config with me? I would love to support more loaders, plugins and settings that people are using with regular Webpack configs. I can add support to what everyone need. This is part of the feedback I’m hoping that have here!
how can I achieve all code under if (Meteor.isServer) not to be shifted to client? Previous versions of webpack:webpack had this feature by default (as I remember), but now it’s not the default behaviour.
I guess I need to config webpack.json and add alias like "Meteor.isServer": false, but I don’t know what exactly I should write.