As you have known, from version 4.6.0, we have let developers control that their Javascript files can be bundled or not when Bundle JavaScript & CSS feature is enabled on the phpFox site. So, purpose of this tutorial is providing the guideline in case you want apply this feature to your files.
- First, you need to add a plugin/hook name
bundle__start
in your apps/themes. - Then, add the list of files that will be bundled with Core files.
Code Block |
---|
language | none |
---|
theme | RDark |
---|
borderStyle | solid |
---|
linenumbers | true |
---|
collapse | false |
---|
|
$aBundleScripts[] = [
'{file_path}' => '{product_type}_{product_dir_name}',
];
|
Wiki Markup |
---|
{{{file_path}}}: the relative path of file with {{assets}} directory.
{{{product_type}}}: type of your product. {{app}} or {{flavors}} (App or Theme)
{{{product_dir_name}}}: name of your product directory.
|
...
Code Block |
---|
language | none |
---|
theme | RDark |
---|
borderStyle | solid |
---|
linenumbers | true |
---|
collapse | false |
---|
|
$aBundleScripts[] = [
'autoload.js' => 'app_core-blogs',
];
|