Closed IT-MikeS closed 5 years ago
When does this happen? Running the following worked for me:
electron-forge init --template vue testvue
cd testvue
electron-forge start
In the below .vue if you change the default one created with electron-forge to that, it will throw the error in the BrowserWindow console ( Cannot find module 'vueify/lib/insert-css' ), or at least it does for me every time I tested it with a new project.
<template>
<div>
<h2 v-bind:class="{greenText: isGreenText}">Hello from test!</h2>
</div>
</template>
<script type="text/babel">
export default {
name: 'test',
data () {
return {
isGreenText: false,
}
},
mounted: function(){
this.testerCss();
},
methods: {
testerCss: function(){
console.log('Called');
this.isGreenText = true;
}
}
}
</script>
<style lang="scss" scoped>
.greenText{
color: #1ead27;
}
</style>
Since I don't know the Vue ecosystem very well, how common is it for someone to inline a style tag in a template, as opposed to in an external file (which I would assume doesn't use that insert-css
module)?
I ask because the templates in this repo are supposed to be the minimal amount of code/dependencies for someone to get going with a given framework.
I cant say for certain how common it is but it's normally considered a better practice to use .vue files for each component which insert-css
is needed for, now this should be taken with a grain of salt as I am for sure not the person who knows everything about VueJS and its ecosystem
This is on my list, Vue support in electron-compile kind of sucks right now. The authors aren't super conducive to making their software work with anything other than Webpack tbh
This is actually a huge issue. Where's the problem in just adding vueify into the package.json?
Dear Guys,
Any news about this?
This one is related: https://github.com/electron-userland/electron-compile/issues/192
I actually don't like the way vueify
is included in electron-compilers
's package.json
: it's bound to one user, which looks like a fork of the actual vueify
. Unfortunately, it's not being installed automatically! Workaround:
npm install vueify --save
This error will come up in the VueJs template, simple fix/workaround for me was to add Vueify as a dependency to the project via yarn/npm. Perhaps it would be worth including it in the templates package.json