Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

detective-vue2

dependents2.8mMIT2.2.0

Get the dependencies of a Vue module

detective, dependencies, module, ast, import, vue

readme

detective-vue2

CI npm version npm downloads

Get the dependencies of Vue module. Supports Vue2 and Vue3

npm install detective-vue2 typescript

Usage

const fs = require('fs');
const detective = require('detective-vue2');

const content = fs.readFileSync('myfile.vue', 'utf8');

// Pass in a file's content or an AST
const dependencies = detective(content);

License

MIT