I am currently utilizing Ionic2 (Browserify) and Typescript with NPM.
I have been exploring how typescript compiles the code into bundles and what gets included in the bundle. I noticed that some of my node require files are referenced automatically, while others require manual script tag additions.
It appears that dependencies like jquery require manual script tags, whereas libraries like lodash are resolved seamlessly and bundled without any extra steps.
What determines the correct referencing of files during the typescript compilation process, and what needs to be handled outside of it?
For instance, in my typescript setup:
import * as jQuery from 'jquery';
-- requires manual script tag addition in index.html
import * as _ from 'lodash';
-- does not need a script tag - it is added automatically
You can see in the image below that some libraries are loaded while others from the node_modules folder are not.
https://i.sstatic.net/5O7vI.png
Is there something specific to the Ionic platform bundling that I might be overlooking?
Thank you!
Package JSON content below:
{
"name": "ionic-conference-app",
"description": "Ionic Conference App",
...
}
Standard Ionic2 Gulpfile:
var gulp = require('gulp'),
gulpWatch = require('gulp-watch'),
...
}