Skip to content
Closed
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
4 changes: 3 additions & 1 deletion packages/core/src/types/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,10 @@ type TransformResult =
export type TransformContext = {
/**
* The code of the module.
* When the transform descriptor has `raw: true`, this will be a Buffer.
* Otherwise, it will be a string.
*/
code: string;
code: string | Buffer;
/**
* The directory path of the currently processed module,
* which changes with the location of each processed module.
Expand Down