Skip to content

resolveDefaultConfig ​

Function @unplugin-pwa/core/config
ts
resolveDefaultConfig(cwd: string): string | undefined

Loads the first existing default configuration file from the current working directory.

The default configuration files are searched in the following order:

  • pwa.config.js
  • pwa.config.ts
  • pwa.config.mjs
  • pwa.config.mts

Parameters ​

  • cwd – The current working directory to search for the default configuration files. Defaults to process.cwd().

Returns: The path to the first existing default configuration file, or undefined if none are found.

Released under the MIT License.