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

Commit

Permalink
Fix VSCode build
Browse files Browse the repository at this point in the history
There were two issues:

- One was resolved by following the steps in microsoft/PowerBI-visuals-tools#365 (comment)
- The other one was caused by the .ttf icon in monaco being moved, I changed the rule to now bundle any ttf with the full name (we only have one anyways).
  • Loading branch information
philipp-spiess committed Mar 2, 2023
1 parent 956596d commit 39c7c5b
Showing 1 changed file with 14 additions and 3 deletions.
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')
/** @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

0 comments on commit 39c7c5b

Please sign in to comment.