Skip to content

Commit 70e059e

Browse files
committed
fix: callback and virtual module
1 parent e6f2d45 commit 70e059e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rsbuild-plugin-unplugin-vue",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"repository": "https://github.com/rspack-contrib/rsbuild-plugin-template",
55
"license": "MIT",
66
"type": "module",

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export type PluginUnpluginVueOptions = {
1010
const isVirtualModule = (request?: string) => {
1111
if (!request) return false;
1212

13-
return request.includes('/node_modules/.virtual');
13+
return request.includes('/node_modules/.virtual') || request.includes('\0');
1414
};
1515

1616
// Preprocessor defined rule in `lib` field will be suffixed with self-increasing serial number.
@@ -96,6 +96,8 @@ export const pluginUnpluginVue = ({
9696
if (result) {
9797
return callback(undefined, false);
9898
}
99+
100+
callback();
99101
});
100102
}
101103
});

0 commit comments

Comments
 (0)