[Vuejs]-V-for="key in columns" was unable to built by webpack in Vue?

0👍

Have You got right webpack config file with babel builder and support for vue components in separate files?

my webpack.config.js

const webpack = require('webpack');
module.exports = {
  // the main entry of our app
  entry: ['./src/index.js', './src/auth/index.js'],
  // output configuration
  output: {
    path: __dirname + '/build/',
    publicPath: 'build/',
    filename: 'build.js'
  },

  module: {
    loaders: [
      // process *.vue files using vue-loader
      { test: /\.vue$/, loader: 'vue' },
      { test: /\.html$/, loader: 'html' },
      // process *.js files using babel-loader
      // the exclude pattern is important so that we don't
      // apply babel transform to all the dependencies!
      { test: /\.js$/, loader: 'babel', exclude: /node_modules/ }
    ]
  },
  babel: {
    presets: ['es2015'],
    plugins: ['transform-runtime']
  },
}

in vue.js good choice for tables is to use vue-tables

Leave a comment