Vue async loader

Translate your sync vue component to async component especially it's too much vue sync component

Version: 0.0.1 Updated: 05/13/2018

By: Pochodaydayup License: MIT

Downloads Last 30 Days: 13

vue-async-loader

NPM version NPM downloads Build Status

Install

$ yarn add vue-async-loader --dev

Usage

// webpack.config.js
const path = require('path')
module.exports = {
  input: './index.js',
  output: {
    path: path.resolve(__dirname, 'dist'),
    filename: 'bundle.js'
  },
  modules: {
    rules: [
      {
        test: /\.js|vue$/,
        exclude: /node_modules/,
        enforce: 'pre',
        use: {
          loader: 'vue-async-loader',
          options: {
            dirs: [path.resolve(__dirname, 'src/index.js')]
          }
        }
      }
    ]
  }
}

API

vue-async-loader

options

dirs

Type: string|array|RegExp Default: *

use to choose which dir is be translate sync to async component

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

vue-async-loader © zhoupengcheng, Released under the MIT License.
Authored and maintained by zhoupengcheng with help from contributors (list).

pocho1995.me · GitHub @Pochodaydayup

Categories: Vue js