Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const getCacheOptions = () => {
const vueLoaderPath = path.dirname(require.resolve('vue-loader'))
const compilerPkg = require(resolveFrom(
vueLoaderPath,
'@vue/component-compiler-utils/package'
))
return api.getCacheConfig('vue-loader', {
'vue-loader': require('vue-loader/package').version,
'@vue/component-compiler-utils': compilerPkg.version,
'vue-template-compiler': api.localResolve(
'vue-template-compiler/package'
)
? api.localRequire('vue-template-compiler/package').version
: null
})
}