Skip to content

Commit

Permalink
build(webpack): use custom build monaco-editor
Browse files Browse the repository at this point in the history
  • Loading branch information
char0n committed Mar 25, 2024
1 parent 3f0eaae commit 981dade
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions packages/react-scripts/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,11 @@ module.exports = function (webpackEnv) {
process: 'process/browser.js',
Buffer: ['buffer', 'Buffer'],
}),
new webpack.BannerPlugin({
banner: "globalThis.vscode = { process: Symbol.for('vscode') };",
raw: true, // This is important, it tells webpack to prepend the code as-is.
entryOnly: true, // This adds the banner only to the beginning of the bundle.
}),
enableProgressPlugin &&
new webpack.ProgressPlugin({
activeModules: false,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"buffer": "^6.0.3",
"react": ">= 16",
"typescript": "^3.2.1 || ^4",
"monaco-editor": ">= 0.44.0",
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"url": ">=0.11.2"
Expand Down

0 comments on commit 981dade

Please sign in to comment.