Skip to content

Not enabled on JSX/TSX files #2025

Open
@KyleSmith0905

Description

@KyleSmith0905

🐞 bug report

Is this a regression?

Not sure

Description

I often use JSX (Preact) alongside my templating framework. Doing this allowed me to develop components/builders that have great DX. I also use it for many other things, such as customizing markers on Google Maps (since it's 3 lines of code and not attached to my angular project).

So I'm using files with a .tsx extension often. However, this breaks Angular Language Service. I'm not sure if there is a way to add file extensions.

Here is a minimal reproduction: https://stackblitz.com/edit/stackblitz-starters-duifxz?file=src%2Fmain.tsx (I also experience this in the desktop VSCode app).

Bug Type

What does this bug affect

  • Angular Language Service VSCode extension
  • Angular Language Service server

^ What?

Reproduction

Steps to reproduce the behavior:

  1. Go to 'set the file extension of an Angular component to .tsx'

Expected behavior

My React and my Angular code should be highlighted.

Logs

Set Angular Log level to verbose.


Angular server logging is off. Please set 'angular.log' and restart the server.

Screenshots

image

🌍 Your Environment

Angular Version:


Angular CLI: 15.2.0
Node: 18.19.0
Package Manager: pnpm 8.15.5
OS: win32 x64

Angular: undefined
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1502.0
@angular-devkit/core         15.2.0
@angular-devkit/schematics   15.2.0
@schematics/angular          15.2.0

Extension Version:


v17.3.1

VSCode Version:


1.88.1

Operating System:


Microsoft Windows 11 Home
10.0.22631 Build 22631

Extension options:


Anything else relevant?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions