Vue Cli Plugin Vite Versions Save

Use vite today, with vue-cli.

v1.5.0

2 years ago
  • vite 2.6+ offers Vue SFC template ts support.
  • fix window.process.env.XXX use before create.

Thanks to @ZenDay.

v1.4.9

2 years ago

unplugin-icons use ~icon/aaa/bbb while this ~ is not css-loader syntax and should not replaced it with empty string. this publish hack the alias regexp for ~ and make unplugin-icons works. Thanks @Akryum.

add example for unplugin ecosystem, unplugin and vue-cli-plugin-vite plays well in nature. very nice.

  module.exports = {
    lintOnSave: process.env.NODE_ENV !== 'production',
    devServer: {
      overlay: false,
    },
    configureWebpack: {
      plugins: [require('unplugin-icons/webpack')({ compiler: 'vue2' })],
    },
    pluginOptions: {
      vite: {
        disabledTypeChecker: true,
        plugins: [require('unplugin-icons/vite')({ compiler: 'vue2' })],
      },
    },
  }

v1.4.8

2 years ago

ref: vue-cli #3499 support config file return function:

module.exports = {
  // config
}

or

module.exports = () => {
  return {
    // config
  }
}

v1.4.7

2 years ago

this plugin will require vue.config.js for extra vite plugins merge. this release improve the error report of it. something like TypeError/ReferenceError but slient when project don't have vue.config.js.

let vueConfig = {}
try {
  vueConfig = require(resolve(process.env.CLI_CONFIG_FILE || 'vue.config.js')) || {}
} catch (e) {
  // handle no vue.config.js
  if (e.code === 'MODULE_NOT_FOUND') {
    if (process.env.VITE_DEBUG) {
      console.error(chalk.redBright(e))
    }
  } else {
    console.error(chalk.redBright(e.stack ?? e))
  }
}

close: #38

v1.4.0

2 years ago
  • support assets without protocol, e.g. <img src="//p0.meituan.com/xxx.png" />
  • support ~public/path/to/use or ~/public/path/to/use
  • support @import '~@/styles/xxx'
  • support dynamic injected(prefixed) env, e.g. VUE_APP_ENV=staging yarn vite
  • inject process.env.BASE_URL like vue-cli

v1.3.1

2 years ago

https://webpack.js.org/loaders/css-loader/#url

Now in Vue SFC, you can use ~@/assets/logo.png both in template block and style block. ~ will be ignore for vite and useful for css-loader. Your code compat with vite and vue-cli. :)

v1.2.2

2 years ago

thanks to vite-plugin-checker & vite-plugin-eslint

  • vue-cli use fork-ts-checker-webpack-plugin(not support template block), vite-plugin-checker use vls, it is better. the errors overlay respect to devServer.overlay options.
  • vue-cli have lineOnSave options and we can infer and respect to it, vite-plugin-eslint like eslint-loader for webpack.

both vite-plugin-checker & vite-plugin-eslint working only for dev(serve) right now.

v1.0.0

2 years ago

vue-cli-plugin-vite is now v1.0.0 after rc1 ~ 6.

v1.0.0-rc.5

2 years ago