Skip to content

Commit

Permalink
chore: make rollup dts happy
Browse files Browse the repository at this point in the history
  • Loading branch information
mengdaoshizhongxinyang committed Jun 26, 2024
1 parent 4982b42 commit 84cc455
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"devDependencies": {
"@stylex-extend/core": "0.3.1",
"@stylex-extend/react": "0.3.1",
"@stylexjs/shared": "^0.7.0",
"@stylexjs/stylex": "^0.5.1",
"@swc/core": "^1.4.16",
"@types/babel__core": "^7.20.5",
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ export class PluginContext {
let pass = false
for (const stmt of this.#stmts) {
const { n } = stmt
// @ts-ignore
if (n && this.importSources.some(i => !path.isAbsolute(n) && n.includes(typeof i === 'string' ? i : i.from))) {
pass = true
}
Expand All @@ -123,7 +122,6 @@ export class PluginContext {
for (const stmt of stmts) {
if (!stmt.n) continue
if (path.isAbsolute(stmt.n) || stmt.n[0] === '.') continue
// @ts-ignore
if (!this.importSources.some(i => stmt.n!.includes(typeof i === 'string' ? i : i.from))) continue
const resolved = await this.#rollupPluginContext!.resolve(stmt.n, id)
if (resolved && resolved.id && !resolved.external) {
Expand Down

0 comments on commit 84cc455

Please sign in to comment.