Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@solid-devtools/debugger seems to be marked as side-effect free when it shouldn't be #294

Open
Alloyed opened this issue Mar 19, 2024 · 2 comments
Labels
debugger Related to the debugger package enhancement New feature or request

Comments

@Alloyed
Copy link
Contributor

Alloyed commented Mar 19, 2024

output from esbuild:

▲ [WARNING] Ignoring this import because "../../node_modules/@solid-devtools/debugger/dist/setup.js" was marked as having no side effects [ignored-bare-import]

    src/Ingame.tsx:16:7:
      16 │ import '@solid-devtools/debugger/setup';
         ╵        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  "sideEffects" is false in the enclosing "package.json" file:

    ../../node_modules/@solid-devtools/debugger/package.json:17:2:
      17 │   "sideEffects": false,
         ╵   ~~~~~~~~~~~~~

https://github.com/thetarnav/solid-devtools/blob/main/packages/debugger/src/setup.ts#L53

This looks like a side effect to me. You could either move this entire body of code into a "injectDevtools" function (I think this is what react does) or just mark the entire package as having side effects in the package.json.

EDIT: workaround: https://esbuild.github.io/api/#ignore-annotations

@Alloyed Alloyed changed the title solid-devtools/devtools seems to be marked as side-effect free when it shouldn't be @solid-devtools/debugger seems to be marked as side-effect free when it shouldn't be Mar 19, 2024
@thetarnav
Copy link
Owner

injectDevtools sounds good

I think I wanted to simplify the setup by having to „just import”

@thetarnav
Copy link
Owner

Marked it as having side effects for now, but I want to move to explicit injectDevtools anyway later.

@thetarnav thetarnav added enhancement New feature or request debugger Related to the debugger package labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debugger Related to the debugger package enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants