|
|
|
@ -30,8 +30,12 @@ export const pitch: PitchLoaderDefinitionFunction<ILoaderOptions> = function pit
|
|
|
|
|
...(globals
|
|
|
|
|
? Object.keys(globals).map((key) => `self[${JSON.stringify(key)}] = ${globals[key]};`)
|
|
|
|
|
: []),
|
|
|
|
|
...pre.map((include: any) => `require(${stringifyRequest(include)});`),
|
|
|
|
|
`module.exports = require(${stringifyRequest(`!!${remainingRequest}`)});`,
|
|
|
|
|
...post.map((include: any) => `require(${stringifyRequest(include)});`)
|
|
|
|
|
...pre.map((include: any) => `import ${stringifyRequest(include)};`),
|
|
|
|
|
`
|
|
|
|
|
import * as monaco from ${stringifyRequest(`!!${remainingRequest}`)};
|
|
|
|
|
export * from ${stringifyRequest(`!!${remainingRequest}`)};
|
|
|
|
|
export default monaco;
|
|
|
|
|
`,
|
|
|
|
|
...post.map((include: any) => `import ${stringifyRequest(include)};`)
|
|
|
|
|
].join('\n');
|
|
|
|
|
};
|
|
|
|
|