How to use the vue-loader/package.version function in vue-loader

To help you get started, we’ve selected a few vue-loader examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github egoist / poi / core / poi / lib / plugins / config-vue.js View on Github external
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
      })
    }