diff --git a/docs/999-big-list-of-options.md b/docs/999-big-list-of-options.md index f74fbf36a13..0595a4dc0cb 100755 --- a/docs/999-big-list-of-options.md +++ b/docs/999-big-list-of-options.md @@ -1053,7 +1053,7 @@ Type: `((id: string) => string) | { [id: string]: string }`
Same as [`context`](guide/en/#context), but per-module – can either be an object of `id: context` pairs, or an `id => context` function. #### output.amd -Type: `{ id?: string, idFromChunkName?: boolean, define?: string}` +Type: `{ id?: string, define?: string }` An object that can contain the following properties: diff --git a/src/rollup/types.d.ts b/src/rollup/types.d.ts index 5cbf3bc32a0..1f5fff6f596 100644 --- a/src/rollup/types.d.ts +++ b/src/rollup/types.d.ts @@ -580,7 +580,6 @@ export interface OutputOptions { amd?: { define?: string; id?: string; - idFromChunkName?: boolean; }; assetFileNames?: string | ((chunkInfo: PreRenderedAsset) => string); banner?: string | (() => string | Promise); diff --git a/src/utils/options/normalizeOutputOptions.ts b/src/utils/options/normalizeOutputOptions.ts index 5b78932727b..7c0bf43c7ee 100644 --- a/src/utils/options/normalizeOutputOptions.ts +++ b/src/utils/options/normalizeOutputOptions.ts @@ -181,7 +181,6 @@ const getPreserveModulesRoot = (config: GenericConfigObject): string | undefined const getAmd = (config: GenericConfigObject): NormalizedOutputOptions['amd'] => ({ define: 'define', - idFromChunkName: false, ...(config.amd as OutputOptions['amd']) }); diff --git a/test/function/samples/output-options-hook/_config.js b/test/function/samples/output-options-hook/_config.js index 2a0e3f0eb41..d0a69df5878 100644 --- a/test/function/samples/output-options-hook/_config.js +++ b/test/function/samples/output-options-hook/_config.js @@ -17,8 +17,7 @@ module.exports = { renderChunk(code, chunk, options) { assert.deepStrictEqual(JSON.parse(JSON.stringify(options)), { amd: { - define: 'define', - idFromChunkName: false + define: 'define' }, assetFileNames: 'assets/[name]-[hash][extname]', chunkFileNames: '[name]-[hash].js',