import type { Plugin } from 'rollup'; import type { FilterPattern } from '@rollup/pluginutils'; import type { StylesheetConfig, DynamicImportConfig } from '@lwc/compiler'; import type { ModuleRecord } from '@lwc/module-resolver'; import type { APIVersion, CompilationMode } from '@lwc/shared'; export interface RollupLwcOptions { /** A boolean indicating whether to compile for SSR runtime target. */ targetSSR?: boolean; /** The variety of SSR code that should be generated, one of 'sync', 'async', or 'asyncYield' */ ssrMode?: CompilationMode; /** A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should transform on. By default all files are targeted. */ include?: FilterPattern; /** A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should not transform. By default no files are ignored. */ exclude?: FilterPattern; /** The LWC root module directory. */ rootDir?: string; /** If `true` the plugin will produce source maps. If `'inline'`, the plugin will produce inlined source maps and append them to the end of the generated file. */ sourcemap?: boolean | 'inline'; /** The [module resolution](https://lwc.dev/guide/es_modules#module-resolution) overrides passed to the `@lwc/module-resolver`. */ modules?: ModuleRecord[]; /** * Default modules passed to the `@lwc/module-resolver`. * If unspecified, defaults to `["@lwc/engine-dom", "@lwc/synthetic-shadow", "@lwc/wire-service"]`. */ defaultModules?: ModuleRecord[]; /** The stylesheet compiler configuration to pass to the `@lwc/style-compiler` */ stylesheetConfig?: StylesheetConfig; /** The configuration to pass to the `@lwc/template-compiler`. */ preserveHtmlComments?: boolean; /** The configuration to pass to `@lwc/compiler`. */ dynamicImports?: DynamicImportConfig; /** The configuration to pass to `@lwc/template-compiler`. */ experimentalDynamicDirective?: boolean; /** The configuration to pass to `@lwc/template-compiler`. */ enableDynamicComponents?: boolean; /** The configuration to pass to `@lwc/compiler`. */ enableSyntheticElementInternals?: boolean; /** The configuration to pass to `@lwc/compiler`. */ enableLightningWebSecurityTransforms?: boolean; /** The configuration to pass to `@lwc/template-compiler`. */ experimentalComplexExpressions?: boolean; /** @deprecated Spread operator is now always enabled. */ enableLwcSpread?: boolean; /** The configuration to pass to the `@lwc/template-compiler`. */ enableLwcOn?: boolean; /** The configuration to pass to `@lwc/compiler` to disable synthetic shadow support */ disableSyntheticShadowSupport?: boolean; /** The API version to associate with the compiled module */ apiVersion?: APIVersion; /** True if the static content optimization should be enabled. Defaults to true */ enableStaticContentOptimization?: boolean; /** * Full module path for a feature flag to import and enforce at runtime. * The module should provide a boolean value as a default export. * Exporting `true` will allow the component to render; exporting `false` will result in a runtime error. * @example '@salesforce/featureFlag/name' */ componentFeatureFlagModulePath?: string; enablePrivateMethods?: boolean; } /** * Rollup plugin for bundling LWC components * @param pluginOptions LWC rollup plugin options * @returns LWC rollup plugin */ export default function lwc(pluginOptions?: RollupLwcOptions): Plugin; //# sourceMappingURL=index.d.ts.map