Delegate with implementation for compiler-specific functions.
▸ getAsset(filename, platform, sendProgress?): Promise<string | Buffer>
Get compiled asset content.
If the compilation is in progress, it should wait until compilation finishes and then return the asset.
| Name | Type | Description |
|---|---|---|
filename |
string |
Filename of the asset to get. |
platform |
string |
Platform of the asset to get. |
sendProgress? |
SendProgress |
Function to notify the client who requested the asset about compilation progress. |
Promise<string | Buffer>
▸ getMimeType(filename, platform, data): string
Detect MIME type of the asset from filename, platform or data (or from combination of either).
| Name | Type | Description |
|---|---|---|
filename |
string |
Filename of the asset. |
platform |
string |
Platform of the asset. |
data |
string | Buffer |
Asset's content. |
string
▸ Optional inferPlatform(uri): undefined | string
Detect the platform from the URI - either from filename, query params or both.
| Name | Type | Description |
|---|---|---|
uri |
string |
URI string. |
undefined | string