Defining Supported File Types

Specify supported file types using the fileExtensions property.

The JavaScript storefront supports a number of file types by default. However, you can use the fileExtensions property to modify the supported extensions.

Define values for this optional property in the JavaScript storefront manifest.json file. The requested file must be part of a JavaScript application and be locally available. If the requested file is not locally available, nginx returns a 404 error. The fileExtensions property is handled during build time.

This example specifies TIFF, WAV, and MOV as supported file types:

{
    "applications": [
        {
            "name": "spartacusstore",
            "path": "spartacusstore",
            "fileExtensions": [
                "tiff",
                "wav",
                "mov"
            ]
        }
    ],
    "nodeVersion": "12"
}  

Default Supported File Extensions

The default supported extensions are:

"fileExtensions": [
                "bmp",
                "json",
                "ejs",
                "jpeg",
                "pdf",
                "ps",
                "ttf",
                "class",
                "eot",
                "jpg",
                "pict",
                "svg",
                "webp",
                "css",
                "eps",
                "js",
                "pls",
                "svgz",
                "woff",
                "csv",
                "gif",
                "mid",
                "png",
                "swf",
                "woff2",
                "doc",
                "ico",
                "midi",
                "ppt",
                "tif",
                "xls",
                "docx",
                "jar",
                "otf",
                "pptx",
                "tiff"
                "xslx"