solid-start icon indicating copy to clipboard operation
solid-start copied to clipboard

[Bug?]: Wrong server build when using "debug" package

Open indeyets opened this issue 1 year ago • 1 comments

Duplicates

  • [X] I have searched the existing issues

Latest version

  • [X] I have tested the latest version

Current behavior 😯

import something from "debug" leads to aliasing of something to console.debug instead of using actual "debug" package.

Expected behavior 🤔

"debug" package should not have special treatment and should be built/bundled as any other package.

Steps to reproduce 🕹

Here's the reproduction repository: https://github.com/indeyets/vinxi-debug-bug It is created using official procedure for solid-start projects.

I added "debug" to dependencies using regular name and using a "ddbbgg" alias. Used both in app.tsx to show the difference.

  1. npm install
  2. npm run build
  3. see .output/server/chunks/nitro/node-server.mjs, search for ".extend("

on my machine it looks like this: const It = debug$1(), Bt = It.extend("error"), Ht = nt("debug2:solid:root"), Nt = Ht.extend("error");

It refers to from "debug" and is broken, Ht refers to from "ddbbgg" and works fine

Context 🔦

No response

Your environment 🌎

No response

indeyets avatar Jan 10 '24 10:01 indeyets

@nksaraf it is probably related to vinxi, but I post here as my reproduction case is in solid-start

indeyets avatar Jan 10 '24 10:01 indeyets