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

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

Open AFatNiBBa opened this issue 10 months ago • 4 comments

Duplicates

  • [X] I have searched the existing issues

Latest version

  • [X] 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 avatar Apr 07 '24 14:04 AFatNiBBa

Is this related to: https://github.com/solidjs/vite-plugin-solid/issues/113 https://github.com/solidjs/vite-plugin-solid/issues/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?

ryansolid avatar May 03 '24 20:05 ryansolid

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

AFatNiBBa avatar May 10 '24 14:05 AFatNiBBa

So I can close it?

ryansolid avatar May 10 '24 19:05 ryansolid

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

AFatNiBBa avatar May 11 '24 02:05 AFatNiBBa