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 e3cf09c
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion cli/help.md
Expand Up @@ -20,7 +20,6 @@ Basic options:
-v, --version Show version number
-w, --watch Watch files in bundle and rebuild on changes
--amd.id <id> ID for AMD module (default is anonymous)
--amd.idFromChunkName Make the ID the chunk file name (appended to `amd.id` if present)
--amd.define <name> Function to use in place of `define`
--assetFileNames <pattern> Name pattern for emitted assets
--banner <text> Code to insert at top of bundle (outside wrapper)
Expand Down
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 e3cf09c

Please sign in to comment.