# Upgrading To 2.0 From 1.x

balm.config Full Upgrade πŸŽ‰

bold: new, normal: changed

# 1. Environment Changes

  • config.static => config.inFrontend
  • config.env
    • config.isProd => config.env.isProd
    • config.isTest => config.env.isTest
    • config.isDev => config.env.isDev
    • config.inSSR => config.env.inSSR
  • config.useDefault => config.useDefaults
balm.go((mix) => {
  console.log(balm.config.env); // Output: { isProd, isTest, isDev, inSSR }
  console.log(mix.env); // Be equal to `balm.config.env`
});

# 2. Stylesheets & Sprites Changes

# 2.1 Working With Stylesheets

  • config.styles.ext => config.styles.extname
  • config.styles.minified
  • config.styles.includePaths => config.styles.atImportPaths
  • config.styles.postcssOptions

# 2.2 Working With Sprites

  • config.sprites.basePath => config.styles.imageBasePath
  • config.sprites.image => config.styles.sprites
  • config.sprites.padding
  • config.styles.spriteRetina
  • config.styles.spriteParams

# 3. JavaScript Changes

  • config.scripts.include => config.scripts.includeJsResource
  • config.scripts.disableDefaultLoaders
  • config.scripts.webpack => config.scripts.webpackOptions
  • config.scripts.vendors
  • config.scripts.cssLoader
  • config.scripts.eslint => config.scripts.lint

# 4. Server Changes

  • config.server.browser
  • config.server.logLevel
  • config.server.reloadDelay
  • config.server.proxyContext
  • config.server.proxyOptions
  • config.server.extraWatchFiles

# 5. Assets Changes

  • config.assets.virtualDir
  • config.cache => config.assets.cache

# 6. Logs Changes

  • config.debug
  • config.logs
    • .level
    • .formatOptions
balm.config = {
  logs: {
    level: 3, // [0, 4] the smaller, the detailed
    formatOptions: {}
  }
};
Last Updated: 4 months ago