@@ -27,12 +27,10 @@ export const showHtmlPage = async (params: HtmlPageParams): Promise<void> => {
2727 const match = / < t i t l e > ( .* ) < \/ t i t l e > / i. exec ( data ) ;
2828 const name = match && match . length > 1 ? match [ 1 ] : '' ;
2929 const resourceDir = Uri . joinPath ( extensionContext . getGlobalStorage ( ) , params . id ) ;
30- // TODO: @vscode /codeicons is a devDependency not a prod dependency. So do we ever reach this code?
31- const distPath = Uri . joinPath ( extensionContext . getExtensionStorageUri ( ) , 'node_modules' , '@vscode/codicons' , 'dist' ) ;
3230 workspace . fs . createDirectory ( resourceDir ) ;
3331 let view = window . createWebviewPanel ( 'htmlView' , name , ViewColumn . Beside , {
3432 enableScripts : true ,
35- localResourceRoots : [ resourceDir , distPath ]
33+ localResourceRoots : [ resourceDir ]
3634 } ) ;
3735 webviews . set ( params . id , view . webview ) ;
3836 const resources = params . resources ;
@@ -44,8 +42,7 @@ export const showHtmlPage = async (params: HtmlPageParams): Promise<void> => {
4442 data = data . replace ( `href="${ resourceName } "` , `href="${ view . webview . asWebviewUri ( resourceUri ) } "` ) ;
4543 }
4644 }
47- const codiconsUri = view . webview . asWebviewUri ( Uri . joinPath ( distPath , 'codicon.css' ) ) ;
48- view . webview . html = data . replace ( 'href="codicon.css"' , `href="${ codiconsUri } "` ) ;
45+ view . webview . html = data ;
4946 view . webview . onDidReceiveMessage ( message => {
5047 switch ( message . command ) {
5148 case 'dispose' :
0 commit comments