Skip to content

Commit

Permalink
chore: resolve current path with fileURLToPath
Browse files Browse the repository at this point in the history
related #48
  • Loading branch information
johannschopplich committed Apr 30, 2024
1 parent 106cbdf commit 224e965
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/unlazy/vite.config.bundle.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 { defineConfig } from 'vite'

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

export default defineConfig({
build: {
Expand Down
3 changes: 2 additions & 1 deletion packages/unlazy/vite.config.bundle.with-hashing.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 { defineConfig } from 'vite'

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

export default defineConfig({
build: {
Expand Down

0 comments on commit 224e965

Please sign in to comment.