Skip to content

Unable to add/update TS path alias in tsconfig.json #393

@dallastjames

Description

@dallastjames

In a new project, it doesn't appear possible to add or change the paths defined in the tsconfig.json file.

Simple Repro

I spun up a blank project using pnpm (pn create solid -> blank) and verified that it ran correctly. Then changed the ts config path that comes predefined from ~/* to @/*, updating the references in the project accordingly. Then running dev, the following error is returned in the console:

An unhandler error occured: Error: Cannot find module '@/components/Counter' imported from '/Projects/Personal/solid-tsconfig-check/src/routes/index.tsx'

From some additional testing, it seems like the ~/* reference is likely overriding whatever is in the typescript config file in the project. That path alias remains valid even after changing it.

Being new to Solid and Solid-Start, I'm unsure if this path is just built in to Solid and to use any other custom ones requires use of a vite plugin, or if this is a build error with Solid Start.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions