@d2-projects/vue-filename-injector

1.1.1 • Public • Published

Vue Filename Injector

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

Install

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

or

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

Usage

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

const VueFilenameInjector = require('@d2-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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.1
    227
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.1
    227
  • 1.1.0
    7
  • 1.0.0
    8

Package Sidebar

Install

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

Weekly Downloads

242

Version

1.1.1

License

MIT

Unpacked Size

4.57 kB

Total Files

9

Last publish

Collaborators

  • cnine
  • li-yang
  • sunhaoxiang