diff --git a/vite/package.json b/vite/package.json index c3e0758..099d321 100644 --- a/vite/package.json +++ b/vite/package.json @@ -1,6 +1,6 @@ { "name": "django-vite-plugin", - "version": "4.0.2", + "version": "4.0.3", "description": "Django plugin for Vite.", "type": "module", "keywords": [ diff --git a/vite/src/helpers.ts b/vite/src/helpers.ts index 6be4801..e494b0f 100644 --- a/vite/src/helpers.ts +++ b/vite/src/helpers.ts @@ -15,7 +15,8 @@ import { AddressInfo } from 'net' const BASE_DIR: string = path.dirname( typeof __dirname === 'undefined' - ? path.dirname(new URL(import.meta.url).pathname) + ? // @ts-ignore + path.dirname(new URL(import.meta.url).pathname) : __dirname, ) diff --git a/vite/src/index.ts b/vite/src/index.ts index 6593d02..8a2d751 100644 --- a/vite/src/index.ts +++ b/vite/src/index.ts @@ -22,7 +22,8 @@ let DJANGO_VERSION = '...' const THIS_DIR: string = typeof __dirname === 'undefined' - ? path.dirname(new URL(import.meta.url).pathname) + ? // @ts-ignore + path.dirname(new URL(import.meta.url).pathname) : __dirname export async function djangoVitePlugin(