Skip to content

Commit

Permalink
Partial fix: ERR_UNSUPPORTED_ESM_URL_SCHEME
Browse files Browse the repository at this point in the history
Windows pathing issue on dev / build nuxt-themes#684
nuxt-themes#684

This is partial fix for windows problem
  • Loading branch information
rekryt authored Nov 22, 2022
1 parent b7fee23 commit c091860
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/module.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { fileURLToPath } from 'url'
import { addPlugin, defineNuxtModule } from '@nuxt/kit'
import { resolve } from 'pathe'
import { addPlugin, defineNuxtModule, createResolver } from '@nuxt/kit'

const themeDir = fileURLToPath(new URL('./', import.meta.url))
const resolveThemeDir = (path: string) => resolve(themeDir, path)
const { resolve } = createResolver(import.meta.url)
const resolveThemeDir = (path: string) => resolve('./', path)

export default defineNuxtModule({
meta: {
Expand Down

0 comments on commit c091860

Please sign in to comment.