How to use the vue-loader.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 znck / vue-slides / packages / @keynote / cli / bin / webpack / createConfig.js View on Github external
config.resolveLoader
    .set('symlinks', true)
    .modules
    .add(path.resolve(__dirname, '../../node_modules'))
    .add(path.resolve(__dirname, '../../../'))
    .add('node_modules')

  config.module
    .noParse(/^(vue)$/)

  const cacheDirectory = path.resolve(__dirname, '../../node_modules/.cache/keynote')
  const cacheIdentifier = JSON.stringify({
    keynote: require('../../package.json').version,
    'cache-loader': require('cache-loader').version,
    'vue-loader': require('vue-loader').version,
    env: process.env.NODE_ENV
  })

  function cached(rule) {
    rule
      .use('cache-loader')
      .loader(require.resolve('cache-loader'))
      .options({
        cacheDirectory,
        cacheIdentifier
      })

    return rule
  }

  function vue(rule) {
github znck / vue-slides / packages / cli / bin / webpack / createConfig.js View on Github external
config.devtool('cheap-module-eval-source-map')
  }

  config.resolve.extensions.merge(['.js', '.vue', '.json'])
  config.resolve.modules.merge(modulePaths)
  config.resolveLoader.modules.merge(modulePaths)
  config.module.noParse(/^(vue)$/)

  const cacheDirectory = path.resolve(
    process.cwd(),
    'node_modules/.cache/keynote'
  )
  const cacheIdentifier = JSON.stringify({
    keynote: require('../../package.json').version,
    'cache-loader': require('cache-loader').version,
    'vue-loader': require('vue-loader').version,
    env: process.env.NODE_ENV
  })

  function cached(rule) {
    rule
      .use('cache-loader')
      .loader('cache-loader')
      .options({
        cacheDirectory,
        cacheIdentifier
      })

    return rule
  }

  function vue(rule) {