Skip to content

can't name function Portal or Match with solid js and vite #213

Open
@jezi21

Description

@jezi21

Describe the bug

With solid-js and vite i can't use component when i name it "Portal" "Match" or something else
Even if i am not importing "Portal" it will use it,
In playground i can name component "Portal" and it works so the problem lays somewhere between vite and solid-js

Your Example Website or App

https://github.com/jezi21/solid_js_bug/tree/main/my-solid-app

Steps to Reproduce the Bug or Issue

import { createSignal } from 'solid-js'
import './App.css'
{/* this component can will work if i add second argument to it like this : function Portal(props,anotherArg) */}
function Portal(props){
return(


{props}

)
}

function App() {
const [count, setCount] = createSignal(0)
return (
<>

    <div>does portal work?</div>

    <div><Portal props={"dont work"}></Portal></div>
    {/* by adding mount we can see error from solid-js Portal */}
    <div><Portal props={"dont' work"} mount={"aaa"}></Portal></div>
  
</>

)
}

Expected behavior

i expect that i can name function Portal
which i can in browser playground
but can't in solid-js and vite

Screenshots or Videos

No response

Platform

  • OS: UBUNTU
  • Browser:tested on firefox and brave
  • Version: solid-js:1.9.5,vite6.2.3 but on older versions same thing happens

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions