unjs / unbuild

📦 A unified JavaScript build system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Internal server error: Failed to resolve import "../context"

Mehdi-Hp opened this issue · comments

Environment

Node: v20.9.0
Vite: v5.0.11
@oku-ui/motion: 0.3.2

Describe the bug

Vite throws and error that says:

[plugin:vite:import-analysis] Failed to resolve import "../context" from "../node_modules/.pnpm/@oku-ui+motion@0.3.2_vue@3.4.6/node_modules/@oku-ui/motion/dist/component/PresenceGroup.vue". Does the file exist?

It happens for PresenceGroup.vue/Presence.vue/Motion.vue.

If I add extension to the import statement and change import { presenceId } from '../context' to import { presenceId } from '../context.mjs', it workes.

Additional context

This is probably an issue with unbuild package, but seems to be fixed in version 2.0.0 and I couldn't figure out what version you're using to build the lib.

unjs/mkdist#45
#83

Logs

No response

This shouldn't be here 🤦🏻 I'm sorry.