Skip to content

Commit e7b66b0

Browse files
committed
fix: compatible with win32 path
1 parent 70e059e commit e7b66b0

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-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.3",
3+
"version": "0.0.4",
44
"repository": "https://github.com/rspack-contrib/rsbuild-plugin-template",
55
"license": "MIT",
66
"type": "module",

src/index.ts

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

13-
return request.includes('/node_modules/.virtual') || request.includes('\0');
13+
console.log('request', request);
14+
return (
15+
/[\\/]node_modules[\\/].virtual/.test(request) || request.startsWith('\0')
16+
);
1417
};
1518

1619
// Preprocessor defined rule in `lib` field will be suffixed with self-increasing serial number.

0 commit comments

Comments
 (0)