Skip to content

Commit

Permalink
build: add flatModuleIndexRedirect to generated metadata redirect (an…
Browse files Browse the repository at this point in the history
  • Loading branch information
jelbourn authored and mmalerba committed Jul 5, 2017
1 parent 960d7eb commit 8ae4d9d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tools/package-tools/metadata-reexport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import {join} from 'path';

/** Creates a metadata file that re-exports the metadata bundle inside of the typings. */
export function createMetadataReexportFile(packageDir: string, packageName: string) {
const metadataReExport =
`{"__symbolic":"module","version":3,"metadata":{},"exports":[{"from":"./typings/index"}]}`;
const metadataReExport = `{
"__symbolic":"module",
"version":3,"metadata":{},
"exports":[{"from":"./typings/index"}],
"flatModuleIndexRedirect": true
}`;
writeFileSync(join(packageDir, `${packageName}.metadata.json`), metadataReExport, 'utf-8');
}

0 comments on commit 8ae4d9d

Please sign in to comment.