Open jmotes opened 5 years ago
@cruzdanilo is this what your pull request (https://github.com/netlify/vue-cli-plugin-netlify-lambda/pull/3/) solves?
cc @shortdiv
@jmotes yes, it is.
@shortdiv if you could find time to review @cruzdanilo's pull request I will buy you a coffee 😄☕️.
I appreciate the #3 PR, but for this specific formidable problem I didn't manage to figure out how to override the global.GENTLY
plugin using vue.config.js
.
I ended up forking the node-formidable
package and removed all the if (global.GENTLY) require = GENTLY.hijack(require);
lines which are causing the problems and perfectly safe to remove from what I can see. Then as I'm using yarn
I could enforce this forked nested dependency in package.json
like so:
...
"dependencies": {
...
"formidable": "https://github.com/e0/node-formidable",
...
},
"resolutions": {
"formidable": "https://github.com/e0/node-formidable"
},
...
I'm needing to apply this to my webpack config to solve a problem with using FaunaDB in my functions:
https://github.com/felixge/node-formidable/issues/337#issuecomment-264337905
Chris Coyier did it this way in his React project, but I cannot seem to get it to work in my vue.config.js.
https://github.com/chriscoyier/netlify-faunadb-example/blob/master/webpack.config.js
Here's my vue.config.js with everything set up, but it seems as if it's completely ignored when building the function: