1.1.0 • Published 4 years ago

@neo-projects/vue-filename-injector v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Vue Filename Injector

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

Install

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

or

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

Usage

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

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