disable_preloader_assets haxedef
When the project contains no assets, excludes asset-related classes for big file size savings
This commit is contained in:
@@ -18,7 +18,9 @@ import ::APP_MAIN::;
|
||||
|
||||
public static function create(config:Dynamic):Void
|
||||
{
|
||||
#if !disable_preloader_assets
|
||||
ManifestResources.init(config);
|
||||
#end
|
||||
|
||||
#if !munit
|
||||
var app = new ::APP_MAIN::();
|
||||
@@ -98,6 +100,7 @@ import ::APP_MAIN::;
|
||||
|
||||
// preloader.create ();
|
||||
|
||||
#if !disable_preloader_assets
|
||||
for (library in ManifestResources.preloadLibraries)
|
||||
{
|
||||
app.preloader.addLibrary(library);
|
||||
@@ -107,6 +110,7 @@ import ::APP_MAIN::;
|
||||
{
|
||||
app.preloader.addLibraryName(name);
|
||||
}
|
||||
#end
|
||||
|
||||
app.preloader.load();
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#if !disable_preloader_assets
|
||||
package;
|
||||
|
||||
|
||||
@@ -136,3 +137,5 @@ import sys.FileSystem;
|
||||
#end
|
||||
|
||||
#end
|
||||
|
||||
#end
|
||||
Reference in New Issue
Block a user