electron-userland / electron-webpack-quick-start

A bare minimum project structure to get started developing with electron-webpack.
https://webpack.electron.build/
730 stars 258 forks source link

Vue.config is undefined #115

Open davidbitton opened 2 years ago

davidbitton commented 2 years ago

Using the template from scratch without further modification, Vue.config.devtools = false in 'renderer/index.js'. Any idea about what may be missing? Thanks!

index.js?ce91:12 Uncaught TypeError: Cannot set property 'devtools' of undefined
    at HTMLScriptElement.init (index.js?ce91:12)
mk-pmb commented 2 years ago

In one of my projects where I bundle Vue with webpack, this happens when I change import Vue from 'vue'; to const Vue = require('vue');. No idea why.

mk-pmb commented 2 years ago

Depending on the import mechanism, Vue's default export might be hidden in a property called default. So if you have

const Vue = require('vue');

change it to:

const Vue = require('vue').default;