diff --git a/src/H5WebViewer.ts b/src/H5WebViewer.ts index 5b97054..2c21bdf 100644 --- a/src/H5WebViewer.ts +++ b/src/H5WebViewer.ts @@ -8,10 +8,9 @@ import { window, workspace, } from 'vscode'; -import { join, basename } from 'path'; -import { writeFileSync, watchFile, unwatchFile } from 'fs'; +import { join, basename, dirname } from 'node:path'; +import { writeFileSync, watchFile, unwatchFile } from 'node:fs'; import { Message, MessageType } from './models'; -import path = require('path'); import { getSupportedPlugins } from './plugins'; export default class H5WebViewer @@ -74,7 +73,7 @@ export default class H5WebViewer const { format, name, payload } = evt.data; const defaultUri = Uri.file( - path.join(path.dirname(document.uri.fsPath), `${name}.${format}`) + join(dirname(document.uri.fsPath), `${name}.${format}`) ); const saveUri = await window.showSaveDialog({ diff --git a/src/plugins.ts b/src/plugins.ts index c1db7d1..c25a00d 100644 --- a/src/plugins.ts +++ b/src/plugins.ts @@ -1,4 +1,4 @@ -import { resolve } from 'path'; +import { resolve } from 'node:path'; import { Uri, Webview } from 'vscode'; import blosc from 'h5wasm-plugins/plugins/libH5Zblosc.so';