From 6acd42305ff34dc6924f6f25e522889d2edfb8af Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Sat, 11 Mar 2023 15:56:09 +0800 Subject: [PATCH] refactor(ui): preload data (#3342) --- packages/ui/.parcelrc | 3 ++- packages/ui/.parcelrc.arm64 | 3 ++- packages/ui/package.json | 4 ++++ packages/ui/src/index.html | 2 ++ pnpm-lock.yaml | 11 +++++++++++ 5 files changed, 21 insertions(+), 2 deletions(-) diff --git a/packages/ui/.parcelrc b/packages/ui/.parcelrc index dc0dae33e..6bea18077 100644 --- a/packages/ui/.parcelrc +++ b/packages/ui/.parcelrc @@ -4,5 +4,6 @@ "**/assets/icons/*.svg": [ "@parcel/transformer-svg-react" ] - } + }, + "resolvers": ["parcel-resolver-ignore", "..."] } diff --git a/packages/ui/.parcelrc.arm64 b/packages/ui/.parcelrc.arm64 index 1d2db2238..47bedc6ab 100644 --- a/packages/ui/.parcelrc.arm64 +++ b/packages/ui/.parcelrc.arm64 @@ -8,5 +8,6 @@ "**/assets/icons/*.svg": [ "@parcel/transformer-svg-react" ] - } + }, + "resolvers": ["parcel-resolver-ignore", "..."] } diff --git a/packages/ui/package.json b/packages/ui/package.json index 95819e7d4..1e3d5de2b 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -57,6 +57,7 @@ "libphonenumber-js": "^1.9.49", "lint-staged": "^13.0.0", "parcel": "2.8.3", + "parcel-resolver-ignore": "^2.1.3", "postcss": "^8.4.6", "postcss-modules": "^4.3.0", "prettier": "^2.8.2", @@ -86,6 +87,9 @@ } } }, + "parcelIgnore": [ + "^/api/.+" + ], "alias": { "@/*": "./src/$1" }, diff --git a/packages/ui/src/index.html b/packages/ui/src/index.html index 983769dcd..acec71900 100644 --- a/packages/ui/src/index.html +++ b/packages/ui/src/index.html @@ -5,6 +5,8 @@ Logto + + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index afc7439fa..c277c9d85 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -904,6 +904,7 @@ importers: libphonenumber-js: ^1.9.49 lint-staged: ^13.0.0 parcel: 2.8.3 + parcel-resolver-ignore: ^2.1.3 postcss: ^8.4.6 postcss-modules: ^4.3.0 prettier: ^2.8.2 @@ -962,6 +963,7 @@ importers: libphonenumber-js: 1.9.49 lint-staged: 13.0.0 parcel: 2.8.3_postcss@8.4.6 + parcel-resolver-ignore: 2.1.3_parcel@2.8.3 postcss: 8.4.6 postcss-modules: 4.3.0_postcss@8.4.6 prettier: 2.8.4 @@ -11178,6 +11180,15 @@ packages: /packet-reader/1.0.0: resolution: {integrity: sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==} + /parcel-resolver-ignore/2.1.3_parcel@2.8.3: + resolution: {integrity: sha512-C8uLvR4o7SPRSsQ/Nylm1/PdsLwn/Z9bzCs66qT3XIebJC7ojaFFF3MDl/mie5audngjcFF8wzU0AoEQkZq2pA==} + engines: {parcel: '>=2.0.0'} + peerDependencies: + parcel: '>=2.0.0' + dependencies: + parcel: 2.8.3_postcss@8.4.6 + dev: true + /parcel/2.8.3_postcss@8.4.14: resolution: {integrity: sha512-5rMBpbNE72g6jZvkdR5gS2nyhwIXaJy8i65osOqs/+5b7zgf3eMKgjSsDrv6bhz3gzifsba6MBJiZdBckl+vnA==} engines: {node: '>= 12.0.0'}