Skip to content

Commit

Permalink
fix: slash on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Feb 27, 2021
1 parent 816297e commit 92e5479
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"name": "vite-plugin-components",
"description": "Components auto importing for Vite",
"version": "0.7.3",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"license": "MIT",
"author": "antfu <[email protected]>",
"description": "Components auto importing for Vite",
"homepage": "https://github.com/antfu/vite-plugin-components",
"bugs": "https://github.com/antfu/vite-plugin-components/issues",
"repository": {
"type": "git",
"url": "https://github.com/antfu/vite-plugin-components"
},
"funding": "https://github.com/sponsors/antfu",
"homepage": "https://github.com/antfu/vite-plugin-components",
"bugs": "https://github.com/antfu/vite-plugin-components/issues",
"license": "MIT",
"author": "antfu <[email protected]>",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "tsup src/index.ts --dts --format cjs,esm",
"dev": "npm run build -- --watch",
"example:dev": "npm -C examples/vue3 run dev",
"example:build": "npm -C examples/vue3 run build",
"build": "tsup src/index.ts --dts --format cjs,esm",
"example:dev": "npm -C examples/vue3 run dev",
"prepublishOnly": "npm run build",
"release": "npx git-ensure -a && npx bumpp --commit --tag --push",
"test": "jest",
Expand All @@ -33,9 +33,6 @@
"fast-glob": "npm:@knightly/fast-glob@master",
"minimatch": "^3.0.4"
},
"peerDependencies": {
"vite": "^2.0.0-beta.69"
},
"devDependencies": {
"@antfu/eslint-config": "^0.4.3",
"@types/debug": "^4.1.5",
Expand All @@ -50,5 +47,8 @@
"tsup": "^4.2.0",
"typescript": "^4.1.5",
"vite": "^2.0.2"
},
"peerDependencies": {
"vite": "^2.0.0-beta.69"
}
}
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function resolveOptions(options: Options, viteConfig: ResolvedConfig): Re
: `{${resolved.extensions.join(',')}}`

resolved.dirs = toArray(resolved.dirs)
resolved.resolvedDirs = resolved.dirs.map(i => resolve(viteConfig.root, i))
resolved.resolvedDirs = resolved.dirs.map(i => slash(resolve(viteConfig.root, i)))

resolved.globs = resolved.dirs.map(i =>
resolved.deep
Expand Down

0 comments on commit 92e5479

Please sign in to comment.