mirror of
https://github.com/microsoft/monaco-editor.git
synced 2024-11-25 16:35:44 +08:00
parent
b61f404730
commit
424abe722e
@ -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');
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user