Skip to content

Commit

Permalink
qualified import
Browse files Browse the repository at this point in the history
  • Loading branch information
John Owens committed Nov 5, 2024
1 parent fcc7e3a commit dc7745e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion both_webgpu/both_node.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// Loading a .node file into a recent version of Node is ... challenging
// https://stackoverflow.com/questions/77913169/loading-native-node-addons-from-es-module
import { createRequire } from "module";
import { createRequire } from "node:module";
const require = createRequire(import.meta.url);
const dawn = require("../../../src/dawn-build/dawn.node");
Object.assign(globalThis, dawn.globals); // Provides constants like GPUBufferUsage.MAP_READ
Expand Down

0 comments on commit dc7745e

Please sign in to comment.