-
-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: ts config paths hmr * fix: skip arg * test: update snap * docs: add hmr fallback plan * test: fix * chore: update
- Loading branch information
1 parent
c0af6db
commit 1ed4df7
Showing
9 changed files
with
96 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@pandacss/types': patch | ||
'@pandacss/core': patch | ||
'@pandacss/node': patch | ||
--- | ||
|
||
Fix issue where HMR doesn't work when tsconfig paths is used. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { convertTsPathsToRegexes } from '@pandacss/config' | ||
import type { LoadConfigResult, LoadTsConfigResult } from '@pandacss/types' | ||
import { parse } from 'tsconfck' | ||
|
||
export async function loadTsConfig(conf: LoadConfigResult, cwd: string): Promise<LoadTsConfigResult | undefined> { | ||
const tsconfigResult = await parse(conf.path, { | ||
root: cwd, | ||
//@ts-ignore | ||
resolveWithEmptyIfConfigNotFound: true, | ||
}) | ||
|
||
if (!tsconfigResult) return | ||
|
||
const { tsconfig, tsconfigFile } = tsconfigResult | ||
const { compilerOptions } = tsconfig | ||
|
||
const result: LoadTsConfigResult = { | ||
tsconfig, | ||
tsconfigFile, | ||
} | ||
|
||
if (compilerOptions?.paths) { | ||
const baseUrl = compilerOptions.baseUrl | ||
result.tsOptions = { | ||
baseUrl, | ||
pathMappings: convertTsPathsToRegexes(compilerOptions.paths, baseUrl ?? cwd), | ||
} | ||
} | ||
|
||
return result | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1ed4df7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
panda-playground – ./playground
panda-playground-chakra-ui.vercel.app
panda-playground.vercel.app
panda-playground-git-main-chakra-ui.vercel.app
play.panda-css.com
1ed4df7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
panda-studio – ./
panda-app.vercel.app
panda-studio-git-main-chakra-ui.vercel.app
panda-studio-chakra-ui.vercel.app
1ed4df7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
panda-docs – ./website
panda-docs.vercel.app
panda-docs-git-main-chakra-ui.vercel.app
panda-docs-chakra-ui.vercel.app
panda-css.com