guess
guess copied to clipboard
Cannot read property 'source' of undefined
I'm trying to create a plugin for Gridsome (based on the Nuxt demos), and it works perfectly in development mode. However, when I try to build a project I get this error:
92% chunk asset optimization TerserPlugin
/path-to-project/Gridsome/plugins/gridsome-plugin-guess-js/node_modules/guess-webpack/dist/guess-webpack/main.js:660 compilation.assets[mainName] = new ConcatSource(stats.compilation.assets['./output.js'], '\n', old.source());
TypeError: Cannot read property 'source' of undefined
The Guess options are as below:
const guessOptions = {
GA: viewId,
minimumThreshold,
jwt,
// Hints Guess to not perform pre-fetching and delegate this logic to its consumer.
runtime: {
delegate: true
},
// Guess does not have to collect the routes and the corresponding bundle entry points.
routeProvider: false
}
Would be glad of some help as to what the issue is here?
Would you share a minimal demo where we can reproduce the problem?
Please see https://github.com/thetre97/gridsome-demo-guess, where I have replicated what my intended plugin does...
Hello @mgechev , any update on this?