diff --git a/packages/remix-dev/compiler/assets/css.ts b/packages/remix-dev/compiler/assets/css.ts index c64306ade11..f2128bcfcba 100644 --- a/packages/remix-dev/compiler/assets/css.ts +++ b/packages/remix-dev/compiler/assets/css.ts @@ -2,7 +2,7 @@ import * as path from "path"; import * as fse from "fs-extra"; import { builtinModules as nodeBuiltins } from "module"; import * as esbuild from "esbuild"; -import { NodeModulesPolyfillPlugin } from "@esbuild-plugins/node-modules-polyfill"; +import { polyfillNode as NodeModulesPolyfillPlugin } from "esbuild-plugin-polyfill-node"; import postcss from "postcss"; import postcssDiscardDuplicates from "postcss-discard-duplicates"; diff --git a/packages/remix-dev/compiler/assets/js.ts b/packages/remix-dev/compiler/assets/js.ts index 0de90cc49a8..8ab6889996b 100644 --- a/packages/remix-dev/compiler/assets/js.ts +++ b/packages/remix-dev/compiler/assets/js.ts @@ -1,7 +1,7 @@ import * as path from "path"; import { builtinModules as nodeBuiltins } from "module"; import * as esbuild from "esbuild"; -import { NodeModulesPolyfillPlugin } from "@esbuild-plugins/node-modules-polyfill"; +import { polyfillNode as NodeModulesPolyfillPlugin } from "esbuild-plugin-polyfill-node"; import type { RemixConfig } from "../../config"; import { type Manifest } from "../../manifest"; diff --git a/packages/remix-dev/compiler/server/index.ts b/packages/remix-dev/compiler/server/index.ts index c2c61f3a7ec..c247ede9e78 100644 --- a/packages/remix-dev/compiler/server/index.ts +++ b/packages/remix-dev/compiler/server/index.ts @@ -1,7 +1,7 @@ import * as path from "path"; import * as esbuild from "esbuild"; import * as fse from "fs-extra"; -import { NodeModulesPolyfillPlugin } from "@esbuild-plugins/node-modules-polyfill"; +import { polyfillNode as NodeModulesPolyfillPlugin } from "esbuild-plugin-polyfill-node"; import type { RemixConfig } from "../../config"; import { type Manifest } from "../../manifest"; diff --git a/packages/remix-dev/package.json b/packages/remix-dev/package.json index d093250e40a..e5786d19b3b 100644 --- a/packages/remix-dev/package.json +++ b/packages/remix-dev/package.json @@ -27,7 +27,6 @@ "@babel/preset-typescript": "^7.18.6", "@babel/traverse": "^7.18.6", "@babel/types": "^7.20.2", - "@esbuild-plugins/node-modules-polyfill": "^0.1.4", "@npmcli/package-json": "^2.0.0", "@remix-run/server-runtime": "1.15.0", "@vanilla-extract/integration": "^6.2.0", @@ -37,6 +36,7 @@ "chokidar": "^3.5.1", "dotenv": "^16.0.0", "esbuild": "0.17.6", + "esbuild-plugin-polyfill-node": "^0.2.0", "execa": "5.1.1", "exit-hook": "2.2.1", "express": "^4.17.1", diff --git a/yarn.lock b/yarn.lock index 6d4c3e7c4d4..4a3d67899a5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1637,14 +1637,6 @@ resolved "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.0.tgz" integrity sha512-14FtKiHhy2QoPIzdTcvh//8OyBlknNs2nXRwIhG904opCby3l+9Xaf/wuPvICBF0rc1ZCNBd3nKe9cd2mecVkQ== -"@esbuild-plugins/node-modules-polyfill@^0.1.4": - version "0.1.4" - resolved "https://registry.npmjs.org/@esbuild-plugins/node-modules-polyfill/-/node-modules-polyfill-0.1.4.tgz" - integrity sha512-uZbcXi0zbmKC/050p3gJnne5Qdzw8vkXIv+c2BW0Lsc1ji1SkrxbKPUy5Efr0blbTu1SL8w4eyfpnSdPg3G0Qg== - dependencies: - escape-string-regexp "^4.0.0" - rollup-plugin-node-polyfills "^0.2.1" - "@esbuild/android-arm64@0.16.17": version "0.16.17" resolved "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.17.tgz#cf91e86df127aa3d141744edafcba0abdc577d23" @@ -2198,6 +2190,11 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" +"@jspm/core@^2.0.1": + version "2.0.1" + resolved "https://registry.npmjs.org/@jspm/core/-/core-2.0.1.tgz#3f08c59c60a5f5e994523ed6b0b665ec80adc94e" + integrity sha512-Lg3PnLp0QXpxwLIAuuJboLeRaIhrgJjeuh797QADg3xz8wGLugQOS5DpsE8A6i6Adgzf+bacllkKZG3J0tGfDw== + "@kwsites/file-exists@^1.1.1": version "1.1.1" resolved "https://registry.npmjs.org/@kwsites/file-exists/-/file-exists-1.1.1.tgz" @@ -5883,6 +5880,14 @@ esbuild-openbsd-64@0.14.47: resolved "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.47.tgz#309af806db561aa886c445344d1aacab850dbdc5" integrity sha512-QpgN8ofL7B9z8g5zZqJE+eFvD1LehRlxr25PBkjyyasakm4599iroUpaj96rdqRlO2ShuyqwJdr+oNqWwTUmQw== +esbuild-plugin-polyfill-node@^0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/esbuild-plugin-polyfill-node/-/esbuild-plugin-polyfill-node-0.2.0.tgz#26a3572c6b32bee126319ebdb4fa3ab584e30106" + integrity sha512-rpCoK4mag0nehBtFlFMLSuL9bNBLEh8h3wZ/FsrJEDompA/AwOqInx6Xow01+CXAcvZYhkoJ0SIZiS37qkecDA== + dependencies: + "@jspm/core" "^2.0.1" + import-meta-resolve "^2.2.2" + esbuild-register@^3.3.2: version "3.3.2" resolved "https://registry.npmjs.org/esbuild-register/-/esbuild-register-3.3.2.tgz" @@ -6440,11 +6445,6 @@ estree-util-visit@^1.0.0: "@types/estree-jsx" "^0.0.1" "@types/unist" "^2.0.0" -estree-walker@^0.6.1: - version "0.6.1" - resolved "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz" - integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== - estree-walker@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz" @@ -7501,6 +7501,11 @@ import-local@^3.0.2: pkg-dir "^4.2.0" resolve-cwd "^3.0.0" +import-meta-resolve@^2.2.2: + version "2.2.2" + resolved "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-2.2.2.tgz#75237301e72d1f0fbd74dbc6cca9324b164c2cc9" + integrity sha512-f8KcQ1D80V7RnqVm+/lirO9zkOxjGxhaTC1IPrBGd3MEfNgmNG67tSUO9gTi2F3Blr2Az6g1vocaxzkVnWl9MA== + imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" @@ -9121,13 +9126,6 @@ lz-string@^1.4.4: resolved "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz" integrity sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY= -magic-string@^0.25.3: - version "0.25.9" - resolved "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz" - integrity sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ== - dependencies: - sourcemap-codec "^1.4.8" - magic-string@^0.27.0: version "0.27.0" resolved "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz#e4a3413b4bab6d98d2becffd48b4a257effdbbf3" @@ -11633,29 +11631,6 @@ rollup-plugin-copy@^3.3.0: globby "10.0.1" is-plain-object "^3.0.0" -rollup-plugin-inject@^3.0.0: - version "3.0.2" - resolved "https://registry.npmjs.org/rollup-plugin-inject/-/rollup-plugin-inject-3.0.2.tgz" - integrity sha512-ptg9PQwzs3orn4jkgXJ74bfs5vYz1NCZlSQMBUA0wKcGp5i5pA1AO3fOUEte8enhGUC+iapTCzEWw2jEFFUO/w== - dependencies: - estree-walker "^0.6.1" - magic-string "^0.25.3" - rollup-pluginutils "^2.8.1" - -rollup-plugin-node-polyfills@^0.2.1: - version "0.2.1" - resolved "https://registry.npmjs.org/rollup-plugin-node-polyfills/-/rollup-plugin-node-polyfills-0.2.1.tgz" - integrity sha512-4kCrKPTJ6sK4/gLL/U5QzVT8cxJcofO0OU74tnB19F40cmuAKSzH5/siithxlofFEjwvw1YAhPmbvGNA6jEroA== - dependencies: - rollup-plugin-inject "^3.0.0" - -rollup-pluginutils@^2.8.1: - version "2.8.2" - resolved "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz" - integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ== - dependencies: - estree-walker "^0.6.1" - rollup@^2.36.1: version "2.75.7" resolved "https://registry.npmjs.org/rollup/-/rollup-2.75.7.tgz" @@ -12030,11 +12005,6 @@ source-map@^0.7.0, source-map@^0.7.3: resolved "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz" integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== -sourcemap-codec@^1.4.8: - version "1.4.8" - resolved "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz" - integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== - space-separated-tokens@^2.0.0: version "2.0.1" resolved "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.1.tgz"