Files
wehub-resource-sync 311a3666c4
Build documentation / build (push) Failing after 0s
Unit tests / build (18) (push) Has been cancelled
Unit tests / build (20) (push) Has been cancelled
Unit tests / build (22) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:44:39 +08:00

15 lines
406 B
JavaScript

/**
* Plugin to automatically mark all node:* imports as external.
* This prevents having to manually list all Node.js built-in modules.
*/
export const externalNodeBuiltinsPlugin = () => ({
name: "external-node-builtins",
setup(build) {
// Mark all node:* imports as external
build.onResolve({ filter: /^node:/ }, (args) => ({
path: args.path,
external: true,
}));
},
});