matfish2 / vue-tables-2

Vue.js 2 grid components
https://matanya.gitbook.io/vue-tables-2/
GNU General Public License v3.0
1.53k stars 305 forks source link

ERROR in ./~/vue-tables-2/lib/methods/render.js #36 #58

Closed JakePerillano closed 7 years ago

JakePerillano commented 7 years ago

var fileName = "list.js"; //source and compiled filename var entryFile = "./public/js/Core/Brand/"+fileName; var destinationFolder = "./public/js/Core/Brand/compiled";

module.exports = { entry: entryFile,

output: {
    path: destinationFolder,
    filename: fileName
},

module: {
    loaders: [
        {
            test: /\.jsx$/,
            loader: 'babel-loader'
        },

        {
            test: /\.js$/,
            loader: 'babel-loader',
            exclude: /node_modules/
        },

        {
            test: /\.jsx?$/,
            loader: 'babel-loader',
            exclude: /node_modules(?!\/(vue-tables-2|vue-pagination-2))/
        }
    ]
},

resolve: {
  alias: {
    'vue$': 'vue/dist/vue.common.js'
  }
}

};

`.babelrc file

{ "presets": [ "es2015" ], "plugins": [ "transform-vue-jsx" ] } JS File

` var Vue= require('vue'); var VueTables = require('vue-tables-2');

var data = []; Vue.use(VueTables.client, { compileTemplates: true, highlightMatches: true, pagination: { }, texts: { filter: "Search:" }, datepickerOptions: { showDropdowns: true } });

const app = new Vue({ el: '#app',

data: {
    columns: ['code','name'],
    tableData: [
      {code:'X', name:'Brand X' }
    ],
    options: {
    // see the options API
    }
},

methods : {
    'search' : function(){
        alerts('ddd');
    }
}

}); `

Thanks for the help!

JakePerillano commented 7 years ago

Hi! Solved this issue.

just need to add test: /\.(js|jsx)$/, on my webpack config file

Thanks!