diff --git a/demo/package.json b/demo/package.json
index 86bbb5f..7d34e91 100644
--- a/demo/package.json
+++ b/demo/package.json
@@ -2,7 +2,7 @@
"name": "demo",
"private": true,
"scripts": {
- "dev": "vite",
+ "dev": "vite --force",
"build": "vite build",
"test": "sirv dist"
},
@@ -20,6 +20,7 @@
"@vitejs/plugin-react-refresh": "^1.3.3",
"sirv-cli": "^1.0.8",
"vite": "link:../node_modules/vite",
- "vite-react-jsx": "link:.."
+ "vite-react-jsx": "link:..",
+ "vite-tsconfig-paths": "^3.3.13"
}
}
diff --git a/demo/pnpm-lock.yaml b/demo/pnpm-lock.yaml
index add6e97..9f60128 100644
--- a/demo/pnpm-lock.yaml
+++ b/demo/pnpm-lock.yaml
@@ -13,6 +13,7 @@ specifiers:
sirv-cli: ^1.0.8
vite: link:../node_modules/vite
vite-react-jsx: link:..
+ vite-tsconfig-paths: ^3.3.13
dependencies:
react: 17.0.2
@@ -29,6 +30,7 @@ devDependencies:
sirv-cli: 1.0.11
vite: link:../node_modules/vite
vite-react-jsx: link:..
+ vite-tsconfig-paths: 3.3.13
packages:
@@ -239,6 +241,10 @@ packages:
to-fast-properties: 2.0.0
dev: true
+ /@cush/relative/1.0.0:
+ resolution: {integrity: sha512-RpfLEtTlyIxeNPGKcokS+p3BZII/Q3bYxryFRglh5H3A3T8q9fsLYm72VYAMEOOIBLEa8o93kFLiBDUWKrwXZA==}
+ dev: true
+
/@polka/url/1.0.0-next.12:
resolution: {integrity: sha512-6RglhutqrGFMO1MNUXp95RBuYIuc8wTnMAV5MUhLmjTOy78ncwOw7RgeQ/HeymkKXRhZd0s2DNrM1rL7unk3MQ==}
dev: true
@@ -355,6 +361,18 @@ packages:
ms: 2.1.2
dev: true
+ /debug/4.3.2:
+ resolution: {integrity: sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==}
+ engines: {node: '>=6.0'}
+ peerDependencies:
+ supports-color: '*'
+ peerDependenciesMeta:
+ supports-color:
+ optional: true
+ dependencies:
+ ms: 2.1.2
+ dev: true
+
/electron-to-chromium/1.3.735:
resolution: {integrity: sha512-cp7MWzC3NseUJV2FJFgaiesdrS+A8ZUjX5fLAxdRlcaPDkaPGFplX930S5vf84yqDp4LjuLdKouWuVOTwUfqHQ==}
dev: true
@@ -386,11 +404,19 @@ packages:
engines: {node: '>=4'}
dev: true
+ /glob-regex/0.3.2:
+ resolution: {integrity: sha512-m5blUd3/OqDTWwzBBtWBPrGlAzatRywHameHeekAZyZrskYouOGdNB8T/q6JucucvJXtOuyHIn0/Yia7iDasDw==}
+ dev: true
+
/globals/11.12.0:
resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==}
engines: {node: '>=4'}
dev: true
+ /globrex/0.1.2:
+ resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==}
+ dev: true
+
/has-flag/3.0.0:
resolution: {integrity: sha1-tdRU3CGZriJWmfNGfloH87lVuv0=}
engines: {node: '>=4'}
@@ -517,6 +543,15 @@ packages:
object-assign: 4.1.1
dev: false
+ /recrawl-sync/2.2.1:
+ resolution: {integrity: sha512-A2yLDgeXNaduJJMlqyUdIN7fewopnNm/mVeeGytS1d2HLXKpS5EthQ0j8tWeX+as9UXiiwQRwfoslKC+/gjqxg==}
+ dependencies:
+ '@cush/relative': 1.0.0
+ glob-regex: 0.3.2
+ slash: 3.0.0
+ tslib: 1.14.1
+ dev: true
+
/sade/1.7.4:
resolution: {integrity: sha512-y5yauMD93rX840MwUJr7C1ysLFBgMspsdTo4UVrDg3fXDvtwOyIqykhVAAm6fk/3au77773itJStObgK+LKaiA==}
engines: {node: '>= 6'}
@@ -569,11 +604,21 @@ packages:
totalist: 1.1.0
dev: true
+ /slash/3.0.0:
+ resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==}
+ engines: {node: '>=8'}
+ dev: true
+
/source-map/0.5.7:
resolution: {integrity: sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=}
engines: {node: '>=0.10.0'}
dev: true
+ /strip-bom/3.0.0:
+ resolution: {integrity: sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=}
+ engines: {node: '>=4'}
+ dev: true
+
/supports-color/5.5.0:
resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==}
engines: {node: '>=4'}
@@ -596,6 +641,31 @@ packages:
engines: {node: '>=6'}
dev: true
+ /tsconfig-paths/3.10.1:
+ resolution: {integrity: sha512-rETidPDgCpltxF7MjBZlAFPUHv5aHH2MymyPvh+vEyWAED4Eb/WeMbsnD/JDr4OKPOA1TssDHgIcpTN5Kh0p6Q==}
+ dependencies:
+ json5: 2.2.0
+ minimist: 1.2.5
+ strip-bom: 3.0.0
+ dev: true
+
+ /tslib/1.14.1:
+ resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==}
+ dev: true
+
/tslib/2.2.0:
resolution: {integrity: sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==}
dev: false
+
+ /vite-tsconfig-paths/3.3.13:
+ resolution: {integrity: sha512-G7OO+1g2H6xVN61RIp1xFjvciqJoF5cGKcWfP6ZOZFeA8QRy2X7yaGUZLhXtKxNLEsR2MthDm7KwSNTKQHzwvA==}
+ peerDependencies:
+ vite: '>2.0.0-0'
+ dependencies:
+ debug: 4.3.2
+ globrex: 0.1.2
+ recrawl-sync: 2.2.1
+ tsconfig-paths: 3.10.1
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
diff --git a/demo/src/Root.tsx b/demo/src/Root.tsx
index 91b3a0b..33668da 100644
--- a/demo/src/Root.tsx
+++ b/demo/src/Root.tsx
@@ -1,54 +1,7 @@
-import { useState } from 'react'
-
-// This local package uses the automatic JSX runtime in a .jsx module
-import One from 'react-one'
-
-// This local package uses `import React from 'react'` in a .tsx module
-import Two from 'react-two'
-
-// This package has a minified CJS entry point and a development module
-import { Switch } from './deps'
-
-// This package has a ESM entry point
-import Dropzone from 'react-dropzone'
+// PROBLEM: This is an alias path set in tsconfig.json
+// This points to src/shared/ui which has an index.ts file that exports stuff
+import { File } from '@/shared/ui'
export const Root = () => {
- const [checked, setChecked] = useState(false)
- return (
- <>
-