SystemJS bundle



I’m trying to setup a offline/disconnected development environment where i can quickly prototype and do not have access to NPM or other online services. My thoughts are that to take all the UMD version of the required libraries and use SystemJS to do browser side compiling. I have this working, however the number of files that have to be loaded is significant. In previous versions of Ionic2, there were ionic.system.js bundles. I have downloaded the source from github and have been able to build a .system version but it does not seem to work with the angular 2.2.1 RC4. When loaded in the browser it always throws the following error:

(SystemJS) Can’t resolve all parameters for provideLocationStrategy: (PlatformLocation, ?, Config).

The app structure is pretty much just the default blank template.

So i guess my question is, what is the best practice/approach/suggestion for this use case? Ultimately what i would like to be able to do is write my TS app outside of the traditional CLI pipeline so that i can test against already existing services and components. Once completed, i can always build and bundle to create a more compact version.




Maybe I’m missing something, but if you create a regular project with the Ionic CLI can you not develop on it while offline? You only need to be online when you first create the project.


The problem is somewhat two fold.

  1. Being in a closed lab environment where there is no internet connection. Creating a project and copying works for the most part. After looking at various plunker examples I am able to get a somewhat non npm Dev environment working but requires pretty much the whole node modules to be hosted and 20+ network requests. So I’m looking to reduce this.

  2. We are a java backend shop. We build using ant/maven and need to be able to call non token based services. So it would be nice if we can embed the development environment within the context of a java web application so that the services can be called within the same domain. I have this somewhat working but feel as if it could be easier.

So my thoughts are to have bundled versions of the various dependencies that can be served out of the web application and to use systemjs browser loading them using the system.config approach. When I try this the problem always occurs when I try to use the bundled versions of the ionic framework. The mud version cannot detect portions of the framework and there is no system version. When I build one it complains about imports and provideLocationStrategy as mentioned in my previous approach.