Skip to content

Commit 92e5479

Browse files
committed
fix: slash on windows
1 parent 816297e commit 92e5479

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
{
22
"name": "vite-plugin-components",
3-
"description": "Components auto importing for Vite",
43
"version": "0.7.3",
5-
"main": "dist/index.js",
6-
"module": "dist/index.mjs",
7-
"types": "dist/index.d.ts",
8-
"license": "MIT",
9-
"author": "antfu <[email protected]>",
4+
"description": "Components auto importing for Vite",
5+
"homepage": "https://github.com/antfu/vite-plugin-components",
6+
"bugs": "https://github.com/antfu/vite-plugin-components/issues",
107
"repository": {
118
"type": "git",
129
"url": "https://github.com/antfu/vite-plugin-components"
1310
},
1411
"funding": "https://github.com/sponsors/antfu",
15-
"homepage": "https://github.com/antfu/vite-plugin-components",
16-
"bugs": "https://github.com/antfu/vite-plugin-components/issues",
12+
"license": "MIT",
13+
"author": "antfu <[email protected]>",
14+
"main": "dist/index.js",
15+
"module": "dist/index.mjs",
16+
"types": "dist/index.d.ts",
1717
"files": [
1818
"dist"
1919
],
2020
"scripts": {
21+
"build": "tsup src/index.ts --dts --format cjs,esm",
2122
"dev": "npm run build -- --watch",
22-
"example:dev": "npm -C examples/vue3 run dev",
2323
"example:build": "npm -C examples/vue3 run build",
24-
"build": "tsup src/index.ts --dts --format cjs,esm",
24+
"example:dev": "npm -C examples/vue3 run dev",
2525
"prepublishOnly": "npm run build",
2626
"release": "npx git-ensure -a && npx bumpp --commit --tag --push",
2727
"test": "jest",
@@ -33,9 +33,6 @@
3333
"fast-glob": "npm:@knightly/fast-glob@master",
3434
"minimatch": "^3.0.4"
3535
},
36-
"peerDependencies": {
37-
"vite": "^2.0.0-beta.69"
38-
},
3936
"devDependencies": {
4037
"@antfu/eslint-config": "^0.4.3",
4138
"@types/debug": "^4.1.5",
@@ -50,5 +47,8 @@
5047
"tsup": "^4.2.0",
5148
"typescript": "^4.1.5",
5249
"vite": "^2.0.2"
50+
},
51+
"peerDependencies": {
52+
"vite": "^2.0.0-beta.69"
5353
}
5454
}

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export function resolveOptions(options: Options, viteConfig: ResolvedConfig): Re
9494
: `{${resolved.extensions.join(',')}}`
9595

9696
resolved.dirs = toArray(resolved.dirs)
97-
resolved.resolvedDirs = resolved.dirs.map(i => resolve(viteConfig.root, i))
97+
resolved.resolvedDirs = resolved.dirs.map(i => slash(resolve(viteConfig.root, i)))
9898

9999
resolved.globs = resolved.dirs.map(i =>
100100
resolved.deep

0 commit comments

Comments
 (0)