webpack config for polyfills

This commit is contained in:
Daniel Avila 2023-02-04 20:49:58 -05:00
parent 502bdc5dd5
commit 81866f197a
4 changed files with 785 additions and 29 deletions

View file

@ -8,4 +8,3 @@
}
*/

793
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -21,10 +21,13 @@
"homepage": "https://github.com/danny-avila/rpp2210-mvp#readme",
"dependencies": {
"chatgpt": "^4.1.1",
"crypto-browserify": "^3.12.0",
"dotenv": "^16.0.3",
"eventsource": "^2.0.2",
"mongoose": "^6.9.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react-dom": "^18.2.0",
"url": "^0.11.0"
},
"devDependencies": {
"@babel/cli": "^7.20.7",

View file

@ -59,7 +59,20 @@ module.exports = {
* resolve the one with the extension listed first in the array and skip the rest.
* This is what enables users to leave off the extension when importing
*/
extensions: ['.js', '.jsx', '.json']
extensions: ['.js', '.jsx', '.json'],
fallback: {
url: require.resolve('url/'),
fs: false,
tls: false,
net: false,
path: false,
zlib: false,
http: false,
https: false,
stream: false,
crypto: false,
'crypto-browserify': require.resolve('crypto-browserify') //if you want to use this module also don't forget npm i crypto-browserify
}
},
module: {
/** "rules"