-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
Doesn't work with electron-forge / electron 24.1.2 #259
Comments
The docs seem to be out of date as you can't create a store in the renderer process anymore. Everything works great if I only create my store in the main process and use IPC to communicate. Electron React Boilerplate project has some useful docs on this. https://electron-react-boilerplate.js.org/docs/electron-store |
My solution was to make a super simple version of electron-store that works for my needs. At the time of this writing electron-store doesn't work with apps packaged with electron-forge, or at least it didn't work for me. I made a gist of what I did for anyone having this problem: https://gist.github.com/steve981cr/499dae0c2a4c6340d0f35656dae92020 |
After some research, i found a solution:
import type {Configuration} from 'webpack';
import {rules} from './webpack.rules';
import {plugins} from './webpack.plugins';
export const mainConfig: Configuration = {
entry: './src/index.ts',
target: "electron-main", // <-- PUT IT HERE
module: {
rules,
},
plugins,
resolve: {
extensions: ['.js', '.ts', '.jsx', '.tsx', '.css', '.json'],
},
};
import type { Configuration } from 'webpack';
import { rules } from './webpack.rules';
import { plugins } from './webpack.plugins';
rules.push({
test: /\.css$/,
use: [{ loader: 'style-loader' }, { loader: 'css-loader' }],
});
export const rendererConfig: Configuration = {
target: "electron-renderer", // <-- PUT IT HERE
module: {
rules,
},
plugins,
resolve: {
extensions: ['.js', '.ts', '.jsx', '.tsx', '.css'],
},
}; |
Hello, seems like this library doesn't work anymore with recent electron ecosystem.
Errors I get:
The text was updated successfully, but these errors were encountered: