modernweb-dev / web

Guides, tools and libraries for modern web development.
https://modern-web.dev
MIT License
2.21k stars 281 forks source link

Built files have '__wds-outside-root__' added to the name even though they are compiled and in the same source tree #2681

Open slalomzacharyd opened 6 months ago

slalomzacharyd commented 6 months ago

When trying to get this working for my typescript/jsx project, compiled dependencies are given the wrong url address. Removing the 'wds-outside-root' address shows the correct file.

Screenshot 2024-03-21 at 21 44 05

The wrong import in the test, gotten from the console.

Screenshot 2024-03-21 at 21 45 08

If you correct the import, you get the compiled file.

Screenshot 2024-03-21 at 21 45 19

Repro:

  1. Unzip the repro
  2. npm install
  3. npm test --watch
  4. d to open the browser in bugging mode
  5. Notice the testUtils.tsx file returns a 404.
  6. If you remove __wds-outside-root__ the file exists and is compiled.

repro.zip

Expected: This should just work.