MCPcopy
hub / github.com/rollup/rollup / getPreserveModules

Function getPreserveModules

src/utils/options/normalizeOutputOptions.ts:202–229  ·  view source on GitHub ↗
(
	config: OutputOptions,
	inlineDynamicImports: boolean,
	inputOptions: NormalizedInputOptions
)

Source from the content-addressed store, hash-verified

200};
201
202const getPreserveModules = (
203 config: OutputOptions,
204 inlineDynamicImports: boolean,
205 inputOptions: NormalizedInputOptions
206): NormalizedOutputOptions['preserveModules'] => {
207 const preserveModules = config.preserveModules || false;
208 if (preserveModules) {
209 if (inlineDynamicImports) {
210 return error(
211 logInvalidOption(
212 'output.inlineDynamicImports',
213 URL_OUTPUT_INLINEDYNAMICIMPORTS,
214 `this option is not supported for "output.preserveModules"`
215 )
216 );
217 }
218 if (inputOptions.preserveEntrySignatures === false) {
219 return error(
220 logInvalidOption(
221 'preserveEntrySignatures',
222 URL_PRESERVEENTRYSIGNATURES,
223 'setting this option to false is not supported for "output.preserveModules"'
224 )
225 );
226 }
227 }
228 return preserveModules;
229};
230
231const getPreserveModulesRoot = (
232 config: OutputOptions

Callers 1

normalizeOutputOptionsFunction · 0.85

Calls 2

errorFunction · 0.90
logInvalidOptionFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…