1.1.0 • Published 6 years ago
@yu-projects/vue-filename-injector v1.1.0
Vue Filename Injector
Inject the file path of the .vue on this.$options.__source.
Install
yarn add @yu-projects/vue-filename-injector -Dor
npm install @yu-projects/vue-filename-injector -DUsage
Only used for vue-cli3, vue.config.js:
const VueFilenameInjector = require('@yu-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
1.1.0
6 years ago