Skip to content

Commit

Permalink
Expose syntheticNamedExports in module info, added docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Amareis committed Oct 30, 2020
1 parent 51e727c commit f3234f6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/05-plugin-development.md
Expand Up @@ -647,6 +647,8 @@ Returns additional information about the module in question in the form
implicitlyLoadedAfterOneOf: string[], // implicit relationships, declared via this.emitChunk
implicitlyLoadedBefore: string[], // implicit relationships, declared via this.emitChunk
hasModuleSideEffects: boolean | "no-treeshake" // are imports of this module included if nothing is imported from it
meta: {[plugin: string]: any} // custom module meta-data
syntheticNamedExports: boolean | string // final value of synthetic named exports
}
```
Expand Down
3 changes: 2 additions & 1 deletion src/Module.ts
Expand Up @@ -284,7 +284,8 @@ export default class Module {
},
isEntry,
isExternal: false,
meta
meta,
syntheticNamedExports
};
}

Expand Down
1 change: 1 addition & 0 deletions src/rollup/types.d.ts
Expand Up @@ -171,6 +171,7 @@ interface ModuleInfo {
isEntry: boolean;
isExternal: boolean;
meta: CustomPluginOptions;
syntheticNamedExports: boolean | string;
}

export type GetModuleInfo = (moduleId: string) => ModuleInfo | null;
Expand Down

0 comments on commit f3234f6

Please sign in to comment.