Skip to main content

bud.setPublicPath

Set the public path. By default the public path will be '' in production and / in development.

To get the value set by this function you should use publicPath

Usage

Set the public path using a string:

bud.setPublicPath('/assets/')

Set the public path using a function:

bud.setPublicPath(publicPath => {
return `https://cdn.com/${publicPath}`
})

Environment variable

You may set the public path using an environment variable: APP_PUBLIC_PATH.

APP_PUBLIC_PATH=/assets/

CLI

You may set the public path using the CLI using the --publicPath flag:

bud build --publicPath /assets/