-
Notifications
You must be signed in to change notification settings - Fork 737
Description
If you are interested in some tasks, please first claim them in the comments, then raise a PR.
This is a follow up of #1041.
So far we are passing the normalize options(done in rust side) from rust to js. I have already build the basic infra for this requirement and consider this as good chance to involve contributors.
Task are
Pass normalized options itself from rust to js for hooks Solved
There are some plugin hooks that require to access normalized options and I just pass faked to them as an workaround to pass type-check.
For guidance, you could see how I did this to generateBundle hook in #2902.
renderChunkhook
rolldown/packages/rolldown/src/plugin/bindingify-output-hooks.ts
Lines 73 to 74 in 788d7fc
| // TODO(hyf0): pass `BindingNormalizedOptions` in `renderChunk` hook | |
| {} as NormalizedOutputOptions, |
writeBundlehook
rolldown/packages/rolldown/src/plugin/bindingify-output-hooks.ts
Lines 213 to 214 in 788d7fc
| // TODO(hyf0): pass `BindingNormalizedOptions` in `renderChunk` hook | |
| {} as NormalizedOutputOptions, |
Pass normalized fields from rust to js
For guidance, you could see how I did this in #2900.
export interface NormalizedOutputOptions {
assetFileNames: string | ((chunkInfo: PreRenderedAsset) => string);
banner: AddonFunction;
chunkFileNames: string | ((chunkInfo: PreRenderedChunk) => string);
dir: string | undefined; // solved
entryFileNames: string | ((chunkInfo: PreRenderedChunk) => string);
esModule: boolean | 'if-default-prop';
exports: 'default' | 'named' | 'none' | 'auto'
externalLiveBindings: boolean;
file: string | undefined;
footer: AddonFunction;
format: InternalModuleFormat; // Supported by rolldown already
inlineDynamicImports: boolean; // solved
name: string | undefined;
outro: AddonFunction;
sourcemap: boolean | 'inline' | 'hidden'; // solved
sourcemapBaseUrl: string | undefined;
sourcemapExcludeSources: boolean;
sourcemapFile: string | undefined;
sourcemapFileNames: string | ((chunkInfo: PreRenderedChunk) => string) | undefined;
}This is current supported options
| export interface NormalizedOutputOptions { | |
| entryFileNames: string | ChunkFileNamesFunction | |
| format: InternalModuleFormat | |
| } |
For input options, I don't feel there are fields need to support so I didn't list them here.
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackPriority