Skip to content

Commit

Permalink
chore: resolve dir entry with fileURLToPath
Browse files Browse the repository at this point in the history
related: #48
  • Loading branch information
johannschopplich committed May 6, 2024
1 parent c34d126 commit 87a42f7
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion packages/nuxt/playground/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import { defineNuxtConfig } from 'nuxt/config'

const currentDir = new URL('.', import.meta.url).pathname
const currentDir = fileURLToPath(new URL('.', import.meta.url))

export default defineNuxtConfig({
modules: ['@unocss/nuxt', '../src/module'],
Expand Down
3 changes: 2 additions & 1 deletion packages/react/playground/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

const currentDir = new URL('.', import.meta.url).pathname
const currentDir = fileURLToPath(new URL('.', import.meta.url))

export default defineConfig({
plugins: [react()],
Expand Down
3 changes: 2 additions & 1 deletion packages/solid/playground/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import { defineConfig } from 'vite'
import solid from 'vite-plugin-solid'

const currentDir = new URL('.', import.meta.url).pathname
const currentDir = fileURLToPath(new URL('.', import.meta.url))

export default defineConfig({
plugins: [solid()],
Expand Down
3 changes: 2 additions & 1 deletion packages/svelte/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import { sveltekit } from '@sveltejs/kit/vite'
import { defineConfig } from 'vite'

const currentDir = new URL('.', import.meta.url).pathname
const currentDir = fileURLToPath(new URL('.', import.meta.url))

export default defineConfig({
plugins: [sveltekit()],
Expand Down
3 changes: 2 additions & 1 deletion packages/vue/playground/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

const currentDir = new URL('.', import.meta.url).pathname
const currentDir = fileURLToPath(new URL('.', import.meta.url))

export default defineConfig({
plugins: [vue()],
Expand Down

0 comments on commit 87a42f7

Please sign in to comment.