Ver código fonte

dev: remove extensions from Vite aliases

This started causing issues as we are transitioning to TS. By removing the file extension, Vite is able to pick up the correct file.
Antoine du Hamel 1 ano atrás
pai
commit
c7bb57b7f8
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      private/dev/vite.config.js

+ 1 - 1
private/dev/vite.config.js

@@ -36,7 +36,7 @@ const config = {
         replacement: `${PACKAGES_ROOT}@uppy/$1/src/index`,
         replacement: `${PACKAGES_ROOT}@uppy/$1/src/index`,
       },
       },
       {
       {
-        find: /^@uppy\/([^/]+)\/lib\/(.+)$/,
+        find: /^@uppy\/([^/]+)\/lib\/(.+?)(\.js)?$/,
         replacement: `${PACKAGES_ROOT}@uppy/$1/src/$2`,
         replacement: `${PACKAGES_ROOT}@uppy/$1/src/$2`,
       },
       },
       //   {
       //   {