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
Is it possible to change node.__dirname to false? #2938
Comments
For what? |
When I execute "yarn dev" and try to go into development mode it works on Windows. However it doesn't work on Mac or Linux, and it gives me a "not allowed to load local resource" error. When I change node.__dirname from "!this.isProduction" to "false" development mode works on Mac/Linux as well. No longer get the error. I don't know what the problem is. The file exists and I'm passing along the correct file path.
That's why I was wondering if you could change node.__dirname, asides from making a change in the package itself. Thanks for the reply! |
Strange. Is it possible to provide demo project? |
Just tested it with electron-webpack-quick-start, on both Windows and Linux. What I did was add an index.html in the src folder. The content doesn't particularly matter. Then edit this in main/index.js.
On Linux (and presumably Mac too) it gave me an "not allowed to load local resource" error. Also want to add that when packaging the app for Mac it works fine. There's no error in the build version. The error only occurs when you want to enter development mode. |
No need to use own index.html. Use renderer/index.js to put your content using JS. |
20.8.1
In node_modules/electron-webpack/out/main.js, I want to change the node.__dirname variable to false. Is it possible to do so through a webpack.config.js or any other way? Or is there no such freedom?
The text was updated successfully, but these errors were encountered: