Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ const uiExtensionSpec = createExtensionSpecification({
anchor: 'extension_points[]',
groupBy: 'target',
key: 'extension_points[].assets',
destination: 'assets',
},
{
type: 'configKey',
Expand Down
8 changes: 4 additions & 4 deletions packages/app/src/cli/services/dev/extension/payload.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,8 @@ describe('getUIExtensionPayload', () => {
},
},
])
expect(resolver.get('CUSTOM_EXTENSION_POINT/assets/foo.json')).toBe('foo.json')
expect(resolver.get('CUSTOM_EXTENSION_POINT/assets/subdir/bar.png')).toBe('subdir/bar.png')
expect(resolver.get('CUSTOM_EXTENSION_POINT/foo.json')).toBe('foo.json')
expect(resolver.get('CUSTOM_EXTENSION_POINT/subdir/bar.png')).toBe('subdir/bar.png')
})
})

Expand Down Expand Up @@ -473,8 +473,8 @@ describe('getUIExtensionPayload', () => {
},
])
// Both targets' resolver entries point at the same output-relative file.
expect(resolver.get('TARGET_A/assets/foo.json')).toBe('foo.json')
expect(resolver.get('TARGET_B/assets/foo.json')).toBe('foo.json')
expect(resolver.get('TARGET_A/foo.json')).toBe('foo.json')
expect(resolver.get('TARGET_B/foo.json')).toBe('foo.json')
})
})

Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/cli/services/dev/extension/payload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ async function staticAssetsMapper(
if (files.length === 0) return {}
const urlSubpath = `${target}/${identifier}`
for (const file of files) {
resolver?.set(`${urlSubpath}/${file}`, file)
resolver?.set(`${target}/${file}`, file)
}
const updatedTimestamps = await Promise.all(
files.map(async (file) => (await fileLastUpdatedTimestamp(joinPath(buildDirectory, file))) ?? 0),
Expand Down
Loading