How to wrap a ES6, webpack-ed React component for atmosphere?

I’m trying to use https://github.com/jaredly/treed in my meteor project.

So far I’ve tried several different routes- ecmascript, rocket:module, and webpack:webpack- but with no success.

To be clear- I don’t want to package my meteor app with webpack,. I just want to use some components from an existing repo and then republish the work on atmosphere.

If you just want to publish a package with that component, one option is to run webpack yourself and publish the compiled file. This could end up being a hassle to update since it won’t be done automatically at publish time, but will almost certainly work.

Just make sure you do something to get it to not bundle its own copy of React.

At that point, I’d rather just disassemble the app and refactor it more meteor-ishly.

Yeah I’m hoping that Meteor 1.3 or 1.4 make it significantly easier to use these components off-the-shelf, so that they don’t need to be wrapped up to be used in Meteor.

@dgreensp, @benjamn do you think some of your work will make this possible?

1 Like

Webpack is not just for es6, it is a complete build system that do much more (including code splitting, manage assets, hot module replacement with no page refresh).

I think it has its place inside Meteor as a plugin but if you just want es6 modules, you might have simplier options.

1 Like

Maybe you can use other solution, for example Universe Modules
This is based on SystemJS and has support for NPM (even ther is option for importing exported variables from regular meteor packages) And works on client/server and app/package