In my angular 2 application, there is a module called common
. Here is how the project structure looks like:
main
--app
/common
--config
//.ts configs for modules
--services
//angular services
--models
--store
//ngrx store
/component1
/component2
app.module.ts
main.ts
--js
//systemjs dependencies
Gruntfile.js
package.json
tsconfig.json
The project currently transpiles to bundle.js and functions as expected. However, I now want to extract the contents of the common
folder and bundle it separately. This way, I can load its dependency using system js
and include it in app.module.ts
to use in components.
I need guidance on how to get started. Do I need to modify the Gruntfile/tsconfig
? Or should I create a separate package.json/index.ts
to transpile the .ts
dependencies?