Skip to content

Commit

Permalink
Import Node module with node: prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
axelboc committed Feb 5, 2024
1 parent 6faf567 commit 64842a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/H5WebViewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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({
Expand Down
2 changes: 1 addition & 1 deletion src/plugins.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down

0 comments on commit 64842a2

Please sign in to comment.