With regards to the common js usage warnings, it seems that MonacoEditorWebpackPlugin is augmenting the source of Monaco Editor and adding CJS modules.
|
return [ |
|
...(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)});`) |
|
].join('\n'); |
With regards to the common js usage warnings, it seems that MonacoEditorWebpackPlugin is augmenting the source of Monaco Editor and adding CJS modules.
monaco-editor/webpack-plugin/src/loaders/include.ts
Lines 29 to 36 in a5298e1