jQWidgets Forums

jQuery UI Widgets Forums Vue Webpack, Babel, Vue and JqxGrid

Tagged: , , ,

This topic contains 3 replies, has 2 voices, and was last updated by  aniolekx 6 years, 1 month ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Webpack, Babel, Vue and JqxGrid #104634

    aniolekx
    Participant

    I have a problem with jqxGrid and Webpack (with Babel).

    Everything works if I set useBuiltIns: ‘entry’, but if I will change it to ‘usage’ I get following error:

    TypeError: this is undefined (jxqcore.js)

    and ‘usage’ is a default value. I have tested this option with different babel/vue presets but it didn’t help.

    Webpack, Babel, Vue and JqxGrid #104670

    aniolekx
    Participant

    Can someone look at this and confirm that issue?

    Webpack, Babel, Vue and JqxGrid #104672

    Peter Stoev
    Keymaster

    hi aniolekx,

    Here’s a sample webpack config which we use with Vue.js

    
    'use strict'
    const path = require('path')
    const webpack = require('webpack')
    const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
    
    module.exports = {
        entry: {
            chart_lineseries: './src/chart/lineseries/main.js',      
        },
        output: {
            path: path.resolve(__dirname + '/dist'),
            filename: '[name].bundle.js'
        },
        resolve: {
            extensions: ['.js', '.vue'],
            alias: {
                'vue$': 'vue/dist/vue.esm.js',
                '@': path.resolve(__dirname + '/src'),
            }
        },
        module: {
            rules: [
                {
                    test: /\.vue$/,
                    loader: 'vue-loader'
                },
                {
                    test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
                    loader: 'url-loader'
                },
                {
                    test: /\.css$/,
                    loaders: ['style-loader', 'css-loader']
                }
            ]
        },
        plugins: [
            // strip all the warnings from Vue.js source code.
            new webpack.DefinePlugin({
                'process.env': {
                    NODE_ENV: '"production"'
                }
            }),
            // uglify build code
            new UglifyJsPlugin({
                // this speeds up the build
                parallel: true
            })
        ]
    }

    You may look at it and apply it in your case.

    Regards,
    Peter Stoev

    jQWidgets team
    https://www.jqwidgets.com

    Webpack, Babel, Vue and JqxGrid #104705

    aniolekx
    Participant

    Thanks but I see that you do not use Babel.I think my issue is related to Babel

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.