Skip to content

Commit

Permalink
remove idFromChunkName
Browse files Browse the repository at this point in the history
  • Loading branch information
tjenkinson committed Nov 15, 2020
1 parent 881b932 commit 7127af0
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/999-big-list-of-options.md
Expand Up @@ -1053,7 +1053,7 @@ Type: `((id: string) => string) | { [id: string]: string }`<br>
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:

Expand Down
1 change: 0 additions & 1 deletion src/rollup/types.d.ts
Expand Up @@ -580,7 +580,6 @@ export interface OutputOptions {
amd?: {
define?: string;
id?: string;
idFromChunkName?: boolean;
};
assetFileNames?: string | ((chunkInfo: PreRenderedAsset) => string);
banner?: string | (() => string | Promise<string>);
Expand Down
1 change: 0 additions & 1 deletion src/utils/options/normalizeOutputOptions.ts
Expand Up @@ -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'])
});

Expand Down
3 changes: 1 addition & 2 deletions test/function/samples/output-options-hook/_config.js
Expand Up @@ -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',
Expand Down

0 comments on commit 7127af0

Please sign in to comment.