Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Fix VSCode build #48559

Merged
merged 2 commits into from
Mar 2, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions client/vscode/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ function getExtensionCoreConfiguration(targetType) {
exclude: /node_modules/,
use: [getBabelLoader()],
},
{
test: /\.m?js/,
resolve: {
fullySpecified: false,
},
},
],
},
plugins: [
Expand Down Expand Up @@ -124,8 +130,8 @@ const searchSidebarWebviewPath = path.resolve(webviewSourcePath, 'sidebars', 'se
const helpSidebarWebviewPath = path.resolve(webviewSourcePath, 'sidebars', 'help')
// Extension Host Worker Path
const extensionHostWorker = /main\.worker\.ts$/
// Monaco Editor Path
const MONACO_EDITOR_PATH = path.resolve(rootPath, 'node_modules', 'monaco-editor')
// Codicons Path
const CODICONS_PATH = path.resolve(rootPath, 'node_modules', '@vscode', 'codicons')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this used somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah we inject it manually. Not sure why but it's definitely loaded by the extension :/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fkling There's no chance that VSCode still uses the old search input right? right?? that one's gone?? so we should be able to rm? :D

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean the variable seems to have been added but not references in the webpack config file... or am I missing anything?

I removed the Monaco query input implementation so... I guess vscode can't use it anymore 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry, I was confused. You're right this line can be delted I've made it work for all .ttf files now.

@fkling oof lots of cleanup potential for VSCode then. But no time 😢

/** @type {import('webpack').Configuration}*/
const webviewConfig = {
context: __dirname, // needed when running `gulp` from the root dir
Expand Down Expand Up @@ -215,12 +221,17 @@ const webviewConfig = {
// to reference path in the extension when we load the font ourselves.
{
test: /\.ttf$/,
include: [MONACO_EDITOR_PATH],
type: 'asset/resource',
generator: {
filename: '[name][ext]',
},
},
{
test: /\.m?js/,
resolve: {
fullySpecified: false,
},
},
],
},
}
Expand Down