@pl-projects/vue-filename-injector

1.1.0 • Public • Published

Vue Filename Injector

Inject the file path of the .vue on this.$options.__source.

Install

yarn add @pl-projects/vue-filename-injector -D

or

npm install @pl-projects/vue-filename-injector -D

Usage

Only used for vue-cli3, vue.config.js:

const VueFilenameInjector = require('@pl-projects/vue-filename-injector')

module.exports = {

  chainWebpack: config => {
    // ...

    // in here, only with chainWebpack
    VueFilenameInjector(config, {
      propName: '__source' // default
    })

  }
}

Relevant

https://github.com/neutrinojs/webpack-chain https://vue-loader.vuejs.org/guide/custom-blocks.html

Package Sidebar

Install

npm i @pl-projects/vue-filename-injector

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

2.15 kB

Total Files

6

Last publish

Collaborators

  • zan