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

[Bug?]: Namespaces are completely stripped out of code #1438

Open
2 tasks done
AFatNiBBa opened this issue Apr 7, 2024 · 4 comments
Open
2 tasks done

[Bug?]: Namespaces are completely stripped out of code #1438

AFatNiBBa opened this issue Apr 7, 2024 · 4 comments
Labels
bug Something isn't working upstream Issue waiting on dependencies

Comments

@AFatNiBBa
Copy link

AFatNiBBa commented Apr 7, 2024

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

If I write a namespace it gets stripped out of JavaScript code.
(Both on build and dev)

Expected behavior 🤔

It shouldn't

Steps to reproduce 🕹

Steps:

  1. Run npm init solid and create a basic project
  2. Move to src/routes/index.tsx
  3. Add the following code
    namespace Test {
      export const test = "test";
    }
    
    console.log(Test);
  4. Excute npm run dev and go to the page

Context 🔦

No response

Your environment 🌎

(I don't know what's the command)

@AFatNiBBa AFatNiBBa added the bug Something isn't working label Apr 7, 2024
@ryansolid ryansolid added the upstream Issue waiting on dependencies label Apr 10, 2024
@ryansolid
Copy link
Member

Is this related to:
solidjs/vite-plugin-solid#113
solidjs/vite-plugin-solid#145

I am not aware of us doing any transformations that aren't part of our vite plugin or refresh plugins so the issue probably belongs there?

@AFatNiBBa
Copy link
Author

Due to this I use version 2.8.3 of vite-plugin-solid, but today I created a new project with the newest version by running npm init solid and I can confirm this problem doesn't occur

@ryansolid
Copy link
Member

So I can close it?

@AFatNiBBa
Copy link
Author

I was talking about normal solid, solid start has still this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Issue waiting on dependencies
Projects
None yet
Development

No branches or pull requests

2 participants