Use Node.js in actions.js #9947
-
Updated question for clarification in hopes to help others who encounter this same issue. In previous versions of Quasar Electron apps, prior to Quasar 2.0, I used to be able to import the following modules directly into my store's actions.js file, and any additional *.js files that may be used for helper methods.
However in Quasar 2.0+ it prevents the use of any Node.js packages from being used which has caused a slew or errors to show. I understand in latest Quasar we can no longer use native Node.js packages for security reasons, however there are good explanations of how to solve this problem. I'm hoping someone can help me solve my problem. Below are the main bits of various js files I currently use in my Electron Desktop app, that utilize the Node.js packages listed above. Could someone explain to me how I can fix my current files to make them useable again in my project using this newly suggested electron-preload.js. Note that I would prefer that I don't have to place all my methods utilizing the Node.js packages into a single js file. That would negate my current organization of code going forward. utils.js
actions.js
Just for clarification these are the errors i now get in Quasar 2.0 when tryin to run dev or build. Which is due to it no long allowing for Node.js packages to be imported.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 15 replies
-
Hi, @JokerMartini 👋 Please see https://quasar.dev/start/upgrade-guide#nodejs-polyfills |
Beta Was this translation helpful? Give feedback.
Hi, @JokerMartini 👋 Please see https://quasar.dev/start/upgrade-guide#nodejs-polyfills