What is app.bundle.js?


Hi. I’m new to either ionic 1 or 2.
I’ve spent a week to try out ionic 2, and I got confused by the ionic project structure.

In the tutorial, it said there’s a file named "app.bundle.js"
However, I used a blank starter project and I don’t see the file or the line to import the file…
Is the documentation outdated? or something was changed?

Another confusion is that there is no ./app/app.ts in the starter project, but app.component.ts and app.module.ts
I couldn’t find any related documentation…
What are the two files?

Any help?


Hello, welcome to ionic.

the file “app.bundle.js” have been renamed “main.js”, but you don’t need to care about this file. This is a generated file.

And there is no more ./app/app.ts since RC0, but the docs are now a bit outdated. .app/app.ts is now app.component.ts and the app.module.ts is the file where you have all your files imports.

But RC0 have been released soon after the angular2 release, maybe too soon. So the docs are not totally up to date and there is a lot of minor bugs? But they will probably release a new RC very soon.


Hi mvrc! Thanks for your reply.

I was trying to understand the correct way to add plugins to my ionic 2 project.
From my understanding, the command line “ionic” is a wrapper of “cordova”( or “phonegap”?).
So which one should I use to add a plugin?

One more question about ionic-native…
To use a plugin listed in ionic-native, do I need to run “ionic plugin add …”?
Because today I just tried, without adding Vibration plugin, vibration still works on Android (haven’t tested on iOS)…which sound weird…


ionic is a wrapper of cordova.
You can add plugin with ionic and if you want to save them to config.xml just add the flag --save.

But i’m not sure you can use all of them without adding them before with plugin add