wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.
https://wasp-lang.dev
MIT License
12.7k stars 1.13k forks source link

Resolving `ext-src` imports in the SDK if the user declares an import with the `.js` ext #2096

Open infomiho opened 2 weeks ago

infomiho commented 2 weeks ago

Users get a weird error saying they can't import queries.js.js something something.

I've reproduced with the latest Wasp version: 0.13.2

As far as I can see, it seems related to the exports fields and the ext-src/* entry 😄

Two instances on Discord:

Martinsos commented 2 weeks ago

Sending this back to triage, multiple people had this and error message is quite confusing, we should take care of it.

Martinsos commented 2 weeks ago

This is in a way related to #2087 , as they might share a solution, which is us completely forbidding, in main.wasp, to have .js or .ts extensions in ext imports, or, another solution, somehow additionally processing extensions to fit with what Wasp requires.

Martinsos commented 1 week ago

User said following:

Was odd because the issue was nonexistent until one day it wasn't.

That is peculiar! Might it mean that one of the deps updated minor version and caused this that way?