Skip to content

WEBuster/vue-auto-import-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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: {
    rules: [
      {
        test: /\.vue$/,
        use: [
          {
            loader: 'vue-loader',
            options: {}  // vue-loader options
          },
          {
            loader: 'vue-auto-import-loader',
            options: {
              scoped: false,
              files: {  // relative to *.vue file path
                template: '[name].html',
                style: '[name].css',
                script: '[name].js'
              },
              langs: {
                template: 'html',
                style: 'css',
                script: 'js'
              }
            }
          }
        ]
      }
    ]
  }
}

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published