MCPcopy Index your code
hub / github.com/rollup/plugins / getPluginOptions

Function getPluginOptions

packages/typescript/src/options/plugin.ts:16–49  ·  view source on GitHub ↗
(options: RollupTypescriptOptions)

Source from the content-addressed store, hash-verified

14 * - `tslib`: ESM code from the tslib helper library (possibly custom).
15 */
16export const getPluginOptions = (options: RollupTypescriptOptions) => {
17 const {
18 cacheDir,
19 exclude,
20 include,
21 filterRoot,
22 noForceEmit,
23 transformers,
24 recreateTransformersOnRebuild,
25 tsconfig,
26 tslib,
27 typescript,
28 outputToFilesystem,
29 compilerOptions,
30 // previously was compilerOptions
31 ...extra
32 } = options;
33
34 return {
35 cacheDir,
36 include,
37 exclude,
38 filterRoot,
39 noForceEmit: noForceEmit || false,
40 tsconfig,
41 compilerOptions: { ...extra, ...compilerOptions } as PartialCompilerOptions,
42 typescript: typescript || defaultTs,
43 tslib: tslib || getTsLibPath(),
44 transformers,
45 // Only enable when explicitly set to true to avoid truthy string pitfalls in JS configs
46 recreateTransformersOnRebuild: recreateTransformersOnRebuild === true,
47 outputToFilesystem
48 };
49};

Callers 1

typescriptFunction · 0.90

Calls 1

getTsLibPathFunction · 0.90

Tested by

no test coverage detected