Skip to content

Commit

Permalink
fix: check it should add insideIslandSuffix or not (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukebe authored Apr 17, 2024
1 parent c40b987 commit 0f62853
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/vite/island-components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,10 @@ export function islandComponents(options?: IslandComponentsOptions): Plugin {
async resolveId(source, importer) {
const resolution = await this.resolve(source, importer)
if (resolution && importer && getIslandComponentName(root, importer, options)) {
return resolution.id + insideIslandSuffix
// Check if it should add a suffix to that file.
if (getIslandComponentName(root, resolution.id, options)) {
return resolution.id + insideIslandSuffix
}
}
},
async load(id) {
Expand Down

0 comments on commit 0f62853

Please sign in to comment.