@d2-admin/ice-scaffold
Version:
27 lines (18 loc) • 476 B
Markdown
Inject the file path of the `.vue` on `this.$options.__source`.
`vue.config.js`:
``` js
const VueFilenameInjector = require('./path/to/vue-filename-injector')
module.exports = {
chainWebpack: config => {
// only with chainWebpack
VueFilenameInjector(config, {
propName: '__source' // default
})
}
}
```
https://github.com/neutrinojs/webpack-chain
https://vue-loader.vuejs.org/guide/custom-blocks.html