vue-cli-plugin-resolve-alias

A Vue-Cli-Plugin for set up resolve alias by using config file.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
vue-cli-plugin-resolve-alias
0.1.34 years ago4 years agoMinified + gzip package size for vue-cli-plugin-resolve-alias in KB

Readme

Vue-CLi-Plugin-Resolve-Alias
A Vue-Cli-Plugin for set up resolve alias by using vue.config.js.

Install

vue add resolve-alias

Example

In your vue.config.js:
const path = require('path')

module.exports = {
  pluginOptions: {
    'resolve-alias': {
      alias: {
        // just like a normal resolve in Webpack
        src: path.resolve(__dirname, './src'),
        common: path.resolve(__dirname, './src/common')
        components: path.resolve(__dirname, './src/components')
      }
    }
  }
}