Output `.meta` files for plain bundles
Summary: Outputs `.meta` files for plain text bundles just like “old packager” did. Reviewed By: jeanlauliac, cpojer Differential Revision: D5077649 fbshipit-source-id: eb87999dd899066adeb9756333adb4d79ce04832
This commit is contained in:
parent
47f52bae67
commit
cce99f44fd
|
@ -10,6 +10,8 @@
|
|||
*/
|
||||
'use strict';
|
||||
|
||||
const meta = require('../../../../local-cli/bundle/output/meta');
|
||||
|
||||
const {createIndexMap} = require('./source-map');
|
||||
const {addModuleIdsToModuleWrapper} = require('./util');
|
||||
|
||||
|
@ -41,7 +43,11 @@ module.exports = (
|
|||
code += `/*# sourceMappingURL=${sourceMapPath}*/`;
|
||||
}
|
||||
|
||||
return {code, map: createIndexMap({file: filename, sections})};
|
||||
return {
|
||||
code,
|
||||
extraFiles: [[`${filename}.meta`, meta(code)]],
|
||||
map: createIndexMap({file: filename, sections}),
|
||||
};
|
||||
}: OutputFn);
|
||||
|
||||
const reLine = /^/gm;
|
||||
|
|
|
@ -78,7 +78,8 @@ export type OutputFn = (
|
|||
) => OutputResult;
|
||||
|
||||
type OutputResult = {|
|
||||
code: string,
|
||||
code: string | Buffer,
|
||||
extraFiles: Iterable<[string, string | Buffer]>,
|
||||
map: SourceMap,
|
||||
|};
|
||||
|
||||
|
|
Loading…
Reference in New Issue