chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Plugin to strip the "node:" prefix from module requests.
|
||||
* Equivalent to webpack's StripNodePrefixPlugin.
|
||||
*/
|
||||
export const stripNodePrefixPlugin = () => ({
|
||||
name: "strip-node-prefix",
|
||||
setup(build) {
|
||||
build.onResolve({ filter: /^node:/ }, (args) => {
|
||||
return {
|
||||
path: args.path.replace(/^node:/, ""),
|
||||
external: true,
|
||||
};
|
||||
});
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user