I am trying to create an application that should run on Windows (PC), Android and iOS.
For this, I will use Electron (for Windows) and React Native (for mobile plates). Both will be built using React and Redux. Thus, I can implement the logic in Redux and middlewares reducers and use them in both projects.
From now on, I made a POC for the Electron application using webpack. Reducers are currently located directly in the application code. I want to extract the relative Redux code in a separate package to allow me to use it in a React Native project.
I can make an npm package for my Redux module containing reducers and middlwares, but this way, when I compile my application, webpack will not compile my separate package, it will use a precompiled version.
So, I want to be able to create a separate package, but still compile it during compilation of the application (because it is still under development, and the developer is very closely connected with the main dev application).
Does this need to be done only with npm or using webpack?
I am new to the Javascript dev stack.
source
share