Skip to content

Commit

Permalink
Fix component name check
Browse files Browse the repository at this point in the history
fix #11
  • Loading branch information
bluwy committed Oct 5, 2022
1 parent e5dc9fa commit 3b6dd9e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.1.6 (2022-10-05)

- Fix component name check ([#11](https://github.com/bluwy/whyframe/issues/11))

## 0.1.5 (2022-10-03)

- Export webpack plugin
Expand Down
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@whyframe/core",
"description": "Core library for whyframe",
"version": "0.1.5",
"version": "0.1.6",
"author": "Bjorn Lu",
"license": "MIT",
"type": "module",
Expand Down Expand Up @@ -60,4 +60,4 @@
"vite": "^3.1.4",
"webpack": "^5.74.0"
}
}
}
2 changes: 1 addition & 1 deletion packages/core/src/plugins/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export function apiPlugin(options = {}) {
!id.includes('__whyframe:') &&
!id.includes('__whyframe-') &&
(code.includes('<iframe') ||
!!options.components?.some((n) => code.includes(`<${n}`)))
!!options.components?.some((n) => code.includes(`<${n.name}`)))
)
},
getDefaultShowSource() {
Expand Down

0 comments on commit 3b6dd9e

Please sign in to comment.