Skip to content

Commit

Permalink
fix: πŸ› resolve load hooks params (#333)
Browse files Browse the repository at this point in the history
* fix: πŸ› resolve load hooks params
  • Loading branch information
maoxiaoke authored Apr 21, 2022
1 parent 428969a commit 9c54707
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/pkg/src/loaders/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default async function runTransform(cfg: TaskConfig, ctx: PkgContext) {

fs.ensureDirSync(dirname(dest));

const id = (await container.resolveId(files[i].filePath))?.id || files[i].filePath;
const id = (await container.resolveId(files[i].filePath))?.id || files[i].absolutePath;

const loadResult = await container.load(id);

Expand Down
2 changes: 1 addition & 1 deletion packages/pkg/src/plugins/dts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function dtsPlugin(entry: string, generateTypesForJs?: UserConfig['generateTypes
|| (generateTypesForJs && isEcmascriptOnly(ext, filePath)),
);

const dtsFiles = dtsCompile(compileFiles);
const dtsFiles = dtsCompile(compileFiles) ?? [];

dtsFiles.forEach((file) => {
this.emitFile({
Expand Down

0 comments on commit 9c54707

Please sign in to comment.