We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
when use electron-forge Follow these steps https://www.electronforge.io/templates/typescript-+-webpack-template
then I add following codes to main.ts
const ElectronStore = require('electron-store'); ElectronStore.initRenderer();
after run start, throw error Uncaught ReferenceError: __dirname is not defined
Uncaught ReferenceError: __dirname is not defined
The text was updated successfully, but these errors were encountered:
I solved the problem by a third party plugin vite-plugin-electron-renderer
import electron from 'vite-plugin-electron' import renderer from 'vite-plugin-electron-renderer' export default { plugins: [ electron({ entry: 'electron/main.ts', }), renderer({ resolve: { // JavaScript cjs lib 'electron-store': { type: 'cjs' }, }, }), ], }
Sorry, something went wrong.
No branches or pull requests
when use electron-forge
Follow these steps https://www.electronforge.io/templates/typescript-+-webpack-template
then I add following codes to main.ts
after run start, throw error
Uncaught ReferenceError: __dirname is not defined
The text was updated successfully, but these errors were encountered: