How to use the vue-loader.withLoaders 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 GuillaumeLeclerc / vue-google-maps / webpack.config.js View on Github external
var vue = require('vue-loader')

module.exports = {
  entry: "./src/main.js",
  output: {
    path: "./build",
    filename: "build.js"
  },
  module: {
    loaders: [
      {
        test: /\.vue$/,
        loader: vue.withLoaders({
          // apply babel transform to all javascript
          // inside *.vue files.
          js: 'babel?optional[]=runtime'
        })
      }
    ]
  },
  devtool: 'source-map'
}
github Haixing-Hu / vue-datetime-picker / karma.conf.js View on Github external
exclude: [
    ],

    // preprocess matching files before serving them to the browser
    // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
    preprocessors: {
      "./test/**/*.js": ['webpack', 'sourcemap'],
      "./demo/**/*.vue": ['webpack', 'sourcemap'],
      "./src/**/*.js": ['webpack', 'sourcemap', 'coverage']
    },

    webpack: {
      devtool: 'inline-source-map',
      module: {
        loaders: [
          { test: /\.vue$/, loader: VueLoader.withLoaders({html: "raw"}) } // use raw-loader to process HTML
        ],
        postLoaders: [{
          test: /\.js$/,
          exclude: /test|node_modules|lib/,
          loader: 'istanbul-instrumenter'
        }]
      }
    },

    webpackMiddleware: {
      noInfo: true
    },

    // test results reporter to use
    // possible values: 'dots', 'progress'
    // available reporters: https://npmjs.org/browse/keyword/karma-reporter
github yang-wei / vue-redux / example / webpack.config.js View on Github external
entry: { 
    app: ['webpack/hot/dev-server', './src/index.js']
  },
  output: {
    path: __dirname,
    publicPath: '/dist/',
    filename: 'app.js'
  },
  resolve: {
    extensions: ['', '.js', '.vue']
  },
  module: {
    loaders: [
      {
        test: /\.vue$/,
        loader: vue.withLoaders({
          js: 'babel?optional[]=runtime'
        })
      }, {
        test: /\.js$/,
        loader: 'babel-loader?blacklist[]=react'
      }
    ] 
  }
}
github birdgg / generator-vuejs / generators / app / templates / _webpack.server.js View on Github external
var vue = require('vue-loader')

module.exports = {
  entry: {
    app: ['webpack/hot/dev-server', './src/main.js']
  },
  output: {
    path: './build',
    filename: 'bundle.js'
  },
  module: {
    loaders: [
      { test: /\.vue$/, loader: vue.withLoaders({
        js: 'babel?optional[]=runtime'
      }) },
      { test: /\.js$/, exclude: /node_modules/, loader: 'babel?optional[]=runtime'}
    ]
  },
  devtool: 'source-map',
  devServer: {
    contentBase: './build',
    historyApiFallback: true
  }
}
github beihaifeiwu / dolphin / dolphin-spring-boot-monitor / gulpfile.js View on Github external
function webpackConfig(opt) {
    var ExtractTextPlugin = require('extract-text-webpack-plugin');
    var scssLoader = ExtractTextPlugin.extract('style','css!sass?outputStyle=expanded&includePaths[]=' + bourbon);
    var config = {
        output: {
            publicPath: paths.context,
            filename: "monitor.bundle.js"
        },
        plugins: [ new ExtractTextPlugin("monitor.css") ],
        module: {
            loaders: [
                {test: /\.vue$/, loader: vue.withLoaders({scss: scssLoader})},
                {test: /\.scss$/, exclude: /node_modules/, loader: scssLoader},
                {
                    test: /\.(jpe?g|png|gif|svg)$/i,
                    loaders: [
                        'file?name=[name].[ext]',
                        'image-webpack?{progressive:true, optimizationLevel: 7, interlaced: false, pngquant:{quality: "65-90", speed: 4}}'
                    ]
                }
            ]
        },
        devtool: 'source-map',
    };
    if (!opt) return config;
    for (var i in opt) {
        config[i] = opt[i]
    }