Vue auto import loader

Auto import template / style / script for *.vue file.

Version: 1.0.0 Updated: 06/28/2017

By: WEBuster License: MIT

Downloads Last 30 Days: 34

vue-auto-import-loader

Build Status Version License

Auto import template / style / script for *.vue file.

Install

npm i -D vue-auto-import-loader

webpack config

{
  module: {
      loaders: [
          {
              test: /\.vue$/,
              loader: 'vue!vue-auto-import'
          }
      ]
  },
  vueAutoImport: {
    scoped: false,
    files: {  // relative to *.vue file path
      template: '[name].html',
      style: '[name].css',
      script: '[name].js'
    },
    langs: {
      template: 'html',
      style: 'css',
      script: 'js'
    }
  }
}
Categories: Vue js