base

TIP

In production environment, CDN path can be configured via base publicPath root path reference webpack, business mode defaults to auto For html part, publicPath defaults to undefined, can be set to full domain or subdirectory, or configured separately in html Public

  • Type: boolean | string | 'auto'
  • Default: 'auto'
emp-config.js
import {defineConfig} from '@empjs/cli'
export default defineConfig(store => {
  return {
    base:'/'
  }
})

Production and Development Environment Examples

emp-config.js
import {defineConfig} from '@empjs/cli'
export default defineConfig(store => {
  return {
    base:store.isDev?'https://dev.xxx.com/':'https://www.xxx.com/'
  }
})