Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type error if using vue-cli without proper webpack config #11

Closed
ztoben opened this issue Dec 19, 2018 · 1 comment
Closed

Type error if using vue-cli without proper webpack config #11

ztoben opened this issue Dec 19, 2018 · 1 comment

Comments

@ztoben
Copy link

ztoben commented Dec 19, 2018

You may want to consider updating the readme to cover an error I was running into. Even though it's not caused by this package, it may be helpful for troubleshooting.

I had bootstrapped my project with vue-cli and was seeing this error after adding the createPersistedState to my store:

TypeError: fs.existsSync is not a function at getElectronPath

I believe this is caused by referencing electron outside of the main.js file.

I fixed it by adding this to my vue.config.js in order to set my target properly:

configureWebpack: config => {
  config.target = "electron-renderer";
}
@akodkod
Copy link
Contributor

akodkod commented Aug 29, 2019

#44

@ztoben ztoben closed this as completed Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants