D2Admin 1.7
Former-commit-id: 3010ce31114fdc121006451c72f9e18306239fd2
This commit is contained in:
Executable
+26
@@ -0,0 +1,26 @@
|
||||
# Vue Filename Injector
|
||||
|
||||
Inject the file path of the `.vue` on `this.$options.__source`.
|
||||
|
||||
## Usage
|
||||
|
||||
`vue.config.js`:
|
||||
|
||||
``` js
|
||||
const VueFilenameInjector = require('./path/to/vue-filename-injector')
|
||||
|
||||
module.exports = {
|
||||
|
||||
chainWebpack: config => {
|
||||
// only with chainWebpack
|
||||
VueFilenameInjector(config, {
|
||||
propName: '__source' // default
|
||||
})
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Relevant
|
||||
|
||||
https://github.com/neutrinojs/webpack-chain
|
||||
https://vue-loader.vuejs.org/guide/custom-blocks.html
|
||||
Reference in New Issue
Block a user