File and Folder Structure

Cordova version

With different Cordova versions, the file and folder structure of a Monaca project are configured differently.

For Cordova 6.2 and 6.5

For Cordova 7.1

www folder

Files of the application’s main body are stored here. Files and folders can be arranged freely within the www folder, but the following parts have a special significance:

Components folder

The folder www/components/ is for all JS/CSS components used in the project. However, the following two files exist in the folder by default regardless of what kinds of components you have added to your project:

The loader.js and loader.css files must be read from an HTML file.

Each component will create its own folder in the (one level below) www/components/ folder.loader.js file also loads cordova.js file.

Plugins folder

If you import a Cordova plugin using a ZIP file, it will be stored inside this folder. However, if you import the plugin using package URL/Plugin ID, the plugin file will be downloaded during build.

config.xml file

The config.xml is a file that controls various settings of Cordova. Please refer to the following documentations regarding how to edit the config.xml file for Android and iOS:

For Cordova 6.2 or higher, config.xml file is also used to configure either Android or iOS application settings. Please refer to Cordova Custom Config Plugin.

See Also:

Last updated