Saturday, 10 June 2017

Import from reactjs build

in out reactjs web app, we used create-react-app to build app.

now another team needs to work on same project to add few more functionalities, but I don't want them to mess around with old code.

if they used our current uglify build in there index.html they can still access all modules that is loaded in our App1 without having to include them in there project, but problem arise from a. linter will error because of using undefined Global variables. b. its not convient.

What we want to achieve is :

Target1:=

build App1 using reactjs+redux+moment+few more lib..

expose a singelton/DI loc that can be used so that Other reactjs Apps can hook onto and mount them selfs inside App1.

Target2:

Create App2 that will npm install App1 and can import all Modules we have on App1 example

import React from 'App1/React' or maybe using getter function const react = App1.getMoudle('react');



via Zalaboza

No comments:

Post a Comment