Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mrm007 committed Oct 11, 2022
1 parent c753774 commit fda2caa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/core/src/plugins/rollup/externals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ async function findDependencies(config: ExternalsOptions) {
const packagesById = new PackagesById();

await promiseMap(externalDeps, async (dep) => {
const depPackagePath = await resolveFrom(packagePath, `${dep}/package.json`);
const depPackagePath = await resolveFrom(
packagePath,
`${dep}/package.json`,
);
const depPackage = loadPackage(depPackagePath);
packagesById.set(dep, depPackage);
});
Expand Down Expand Up @@ -55,16 +58,13 @@ export function externals(packageRoot: string, format: Format = 'esm'): Plugin {

return {
...plugin,

name: `crackle:patched-${plugin.name}`,

async buildStart(options) {
await Promise.all([
(plugin as FunctionPluginHooks).buildStart.call(this, options),
findDependencies(config).then((result) => (packagesById = result)),
]);
},

async resolveId(source, importer, options) {
const resolved = (plugin as FunctionPluginHooks).resolveId.call(
this,
Expand Down

0 comments on commit fda2caa

Please sign in to comment.