For the past 3 weeks, a friend and I developed a rather large and complex Meteor/React app along with Browserify to handle some NPM dependencies.
Lately, I’ve gotten into Webpack (via the flow router kickstart project) and absolutely love it.
Unfortunately, we have over 40 components written in the following style (which pollutes the global scope):
MainPage = React.createClass({
render() {
return (
<div>
<TopNavbar />
<h1>Content Here</h1>
</div>
);
}
});
I’ve been trying for more than two days to convert our app to the webpack way, but it’s starting to seem impossible to do it without significantly rewriting the entire app.
I’ve tried copy and pasting all the global namespaced components into the kickstart project. But since it’s webpack, they can’t seem to find it in the global scope. This means I have to write import/export statements for each and everyone of the 40+ components before I can even get the app to run.
Is there a better way for me to convert to Webpack without rewriting everything?