({dependency, options, specifier})
| 15 | |
| 16 | module.exports = new Resolver({ |
| 17 | async resolve({dependency, options, specifier}) { |
| 18 | // Move intl files into their own parallel bundles. |
| 19 | if (/intl\/[a-zA-Z-]+\.json$/.test(specifier)) { |
| 20 | const resolver = new NodeResolver({ |
| 21 | fs: options.inputFS, |
| 22 | projectRoot: options.projectRoot, |
| 23 | extensions: ['ts', 'tsx', 'd.ts', 'js'], |
| 24 | mainFields: ['source', 'types', 'main'] |
| 25 | }); |
| 26 | |
| 27 | let resolved = await resolver.resolve({ |
| 28 | filename: specifier, |
| 29 | specifierType: dependency.specifierType, |
| 30 | parent: dependency.resolveFrom, |
| 31 | env: dependency.env, |
| 32 | sourcePath: dependency.sourcePath |
| 33 | }); |
| 34 | resolved.priority = 'parallel'; |
| 35 | return resolved; |
| 36 | } |
| 37 | } |
| 38 | }); |
nothing calls this directly
no outgoing calls
no test coverage detected