2

We want to separate our components into multiple projects and develop them separately. We do NOT want to pull them in as npm dependencies but rather, pull them in like remote "src" files in html. Is this possible?

import MyCustomReactComponent from "http://foobar";

Puzzo
  • 43
  • 1
  • 7
  • 1
    Are you using any module bundler? – Felix Kling Aug 19 '16 at 13:07
  • Webpack and babel at the moment. – Puzzo Aug 19 '16 at 13:10
  • This seems relevant: http://stackoverflow.com/q/36496242/218196 – Felix Kling Aug 19 '16 at 13:13
  • Yeah sadly it looks like you cant use System.import in the current version of web pack. The little-loader seems like a hack – Puzzo Aug 19 '16 at 13:37
  • 1
    Just curious, why don't you want to pull in React components via npm? – Michael Parker Aug 19 '16 at 14:30
  • The idea is that you can develop a component of your application, say for example, a chat box. You can then have a team that is responsible for creating and maintaining that chat box component. Now that team makes updates or fixes and deploys, when a user refreshes their browser they will get the updates. If we did it through node modules, then we would have to pull in the new version and redeploy for each component that gets changed. – Puzzo Aug 19 '16 at 16:10

1 Answers1

3

You might want to take a look at this: https://gist.github.com/tonytonyjan/616022dce75f8e6c1603bbeb94ec46a4

wei
  • 3,312
  • 4
  • 23
  • 33