quasar and webpack-bundle-tracker



  • I’m trying to use webpack-bundle-tracker with quasar. I use extendWebpack, in my quasar.conf.js file, to run BundleTracker, which works (shown below). But the file it produces does not contain the publicPath I set in quasar.conf.js. webpack-bundle-tracker works with vue and the normal webpack config files. Has anybody tried using webpack-bundle-tracker with quasar, and found a solution?

    extendWebpack (cfg) {
    cfg.plugins.push(
    new BundleTracker({filename: ‘…/webpack-stats.json’})
    ),
    cfg.module.rules.push({
    enforce: ‘pre’,
    test: /.(js|vue)$/,
    loader: ‘eslint-loader’,
    exclude: /node_modules/,
    options: {
    formatter: require(‘eslint’).CLIEngine.getFormatter(‘stylish’)
    }
    })
    }



  • I found that I did not need to use this method.



  • Add publicpath: "http://localhost:8080/" in the arguments… now it works

    extendWebpack(cfg) {
    cfg.plugins.push(
    new BundleTracker({
    filename: “webpack-stats.json”,
    publicPath: “http://localhost:8080/
    })
    ),
    cfg.module.rules.push({
    enforce: “pre”,
    test: /.(js|vue)$/,
    loader: “eslint-loader”,
    exclude: /node_modules/,
    options: {
    formatter: require(“eslint”).CLIEngine.getFormatter(“stylish”)
    }
    });
    }


Log in to reply