build: add flatModuleIndexRedirect to generated metadata redirect (#5512)

This commit is contained in:
Jeremy Elbourn
2017-07-05 10:35:22 -07:00
committed by mmalerba
parent 960d7eb1fe
commit 8ae4d9d085
+6 -2
View File
@@ -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');
}