UNPKG

sw-builder

Version:

The sw-builder package automates the creation of your Application's Service Worker, which pre-caches your build. This leads to a better overall performance and enables users to access your PWA without an Internet connection.

15 lines (14 loc) 705 B
import { IModuleArgs } from '../shared/types.js'; /** * Executes the sw-builder script and builds the Service Worker based on the configuration. * @param args * @throws * - NOT_A_FILE: if the path is not recognized by the OS as a file or if it doesn't exist * - FILE_CONTENT_IS_EMPTY_OR_INVALID: if the content of the file is empty or invalid or the JSON * content cannot be parsed * - INVALID_CONFIG_VALUE: if any of the essential config values is invalid * - INVALID_TEMPLATE_NAME: if the provided template name is not supported * - NOT_A_PATH_ELEMENT: if the provided path doesn't exist or is not a valid path element */ declare const run: ({ config }: IModuleArgs) => void; export { run, };