You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.
I am using r6api.js within an electron application (I am using the Vue CLI Plugin Electron Builder). However, it occurred to me that using r6api.js in combination with webpack fails due to:
TypeError: nodeFetch is not a function
at eval (webpack:///./node_modules/r6api.js/lib/fetch.js?:10:3)
It seems like there is an issue using require together with webpack.
For example quickly changing const nodeFetch = require('node-fetch'); to const nodeFetch = require('node-fetch').default; in /lib/fetch.js solves the issue for me. However, I didn't investigate too much if this may introduce other issues.
You can find some more infos about this problem here:
Run into this issue myself the other day, using typescript branch myself which is works fine with webpack but obviously can't recommend you that because of breaking changes. Keep doing that you doing if it's works, will try to merge typescript branch after realese of North Star
Hi!
I am using
r6api.js
within an electron application (I am using the Vue CLI Plugin Electron Builder). However, it occurred to me that usingr6api.js
in combination with webpack fails due to:It seems like there is an issue using
require
together with webpack.For example quickly changing
const nodeFetch = require('node-fetch');
toconst nodeFetch = require('node-fetch').default;
in/lib/fetch.js
solves the issue for me. However, I didn't investigate too much if this may introduce other issues.You can find some more infos about this problem here:
default
exports in ES Modules webpack/webpack#4742Is there any chance you could make
r6api.js
webpack ready?Thanks in advance!
The text was updated successfully, but these errors were encountered: