Migrate from 9 to 10

Presets

Presets are now Plugins, and the official ones are published under the @poi organization on npm. e.g. for the old poi-preset-karma now it becomes:

// poi.config.js
module.exports = {
  plugins: [
    require('@poi/plugin-karma')()
  ]
}

Third-party plugins follow the poi-plugin-name naming convention.

Options

dist

dist is now outDir.

homepage

homepage is now publicPath.

jsx

jsx is now babel.jsx, and defaults to react instead of vue.

transformModules

transformModules is now babel.include.

postcss

postcss option is removed, you should use the postcss config file instead.

autoprefixer

This option is also removed.

cssModules

cssModules is now css.modules.

extractCSS

extractCSS is now css.extract.

env

env is now a boolean value, which indicates whether to load .env.{process.env.NODE_ENV} file.

templateCompiler

templateCompiler is now vue.fullBuild.

removeDist

removeDist is now cleanOutDir.

library

library option is removed.

vendor

vendor option is removed. We will automatically disable vendor code splitting when your format is set to cjs or umd.

extendWebpack

This option is renamed to chainWebpack, but the old name still works.

webpack

This option is renamed to configureWebpack, but the old name still works.