MCPcopy Create free account
hub / github.com/adobe/react-spectrum / resolveId

Function resolveId

vitest.browser.config.ts:28–35  ·  view source on GitHub ↗
(source, importer)

Source from the content-addressed store, hash-verified

26 return {
27 name: 'intl-json-loader',
28 async resolveId(source, importer) {
29 if (importer && /\/intl\/.*\*.json$/.test(source)) {
30 const dir = path.dirname(importer);
31 const intlDir = path.resolve(dir, source.replace('*.json', ''));
32 return `virtual:intl-messages:${intlDir}`;
33 }
34 return null;
35 },
36 async load(id) {
37 if (id.startsWith('virtual:intl-messages:')) {
38 const intlDir = id.replace('virtual:intl-messages:', '');

Callers

nothing calls this directly

Calls 1

hasMethod · 0.65

Tested by

no test coverage detected