-
Notifications
You must be signed in to change notification settings - Fork 33
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
Uncaught ReferenceError: __dirname is not defined #97
Comments
Closed
3 tasks
Just only use it in main process fixes this. module: {
rules: [
...require('./webpack.rules'),
{
test: /\.(m?js|node)$/,
parser: { amd: true },
use: {
loader: '@zeit/webpack-asset-relocator-loader',
options: {
outputAssetBase: 'native_modules',
emitDirnameAll: true,
},
},
},
],
}, |
linonetwo
added a commit
to tiddly-gittly/TidGi-Desktop
that referenced
this issue
May 4, 2021
3 tasks
@yuwanlin My experience is try not import any node related npm package or ts file in renderer/preload. If do so, there will be error like this. You can time travel in git to find which commit introduce such an import. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When used in the electron project it cause this bug with nodeIntegration: false.
In this last line:
↑
The text was updated successfully, but these errors were encountered: