New to electron so this is very possibly user error, and if so, I apologize in advance. Would very much appreciate some help.
When I import _some_ packages into my project I get syntax errors in the console.
When I use the regular vue webpack-simple template with the same plugins an they work fine. Not sure what I'm doing wrong.
This is not for all plugins, just some. I'm unsure of how to debug the errors. The errors have so far come from template tags and css.
#
Console Syntax Errors thrown on some plugins that work in regular vue webpack-simple template
#
vue init simulatedgreg/electron-vue my-project
$ cd my-project
$ npm install
$ cd app
$ npm install vue-video-player --save
then in app/src/renderer/main.js
import VueVideoPlayer from 'vue-video-player'
Vue.use(VueVideoPlayer)
then
$ npm run dev
#

Thank-you
@rugor
Quick fix, update your webpack.renderer.config.js at line 19 to...
externals: Object.keys(pkg.dependencies || {}).filter(d => !['vue','vue-video-player'].includes(d)),
Not entirely sure why some modules don't like to be treated as externals. When installing vue-video-player, did you use npm or yarn?
@SimulatedGREG I used npm to install the package.
I'm figuring out electron-vue by porting over an existing project and a few plugins/modules had this issue. Will keep messing around with it, seems like a good way to learn -- will report back if I figure out anything more.
Thanks for taking the time to answer, and for this project.
Thanks for the feedback. Feel free to comment back any questions.
Hey @SimulatedGREG , commenting back on this because I just updated to the newest version of electron-vue and I am receiving the same error as above when importing two npm packages. Steps to reproduce below:
$ vue init simulatedgreg/electron-vue my-project
$ cd my-project
$ npm install
$ npm install vue-video-player --save
then in webpack.renderer.config.js (now in the root folder) updating line 19 to:
externals: Object.keys(pkg.dependencies || {}).filter(d => !['vue', 'vue-video-player'].includes(d)),
Console error:

Any help appreciated.
Cancel that... got it working by modifying whiteListedModules in.electron-vue/webpack.renderer.config.js as per:
https://simulatedgreg.gitbooks.io/electron-vue/content/en/webpack-configurations.html#white-listing-externals
Not sure how you may have migrated your project to a newer electron-vue version, but make sure your vue-cli is updated for future reference. There was a bug awhile back that mistakenly merged cached templates with updated ones.
Thanks @SimulatedGREG will look into that.
Most helpful comment
@rugor
Quick fix, update your
webpack.renderer.config.jsat line 19 to...Not entirely sure why some modules don't like to be treated as externals. When installing
vue-video-player, did you usenpmoryarn?