Bug(ngtools/webpack): elideImports transformer mistakenly treat jsxFactory as unused import #13297
Labels
area: @ngtools/webpack
freq1: low
Only reported by a handful of users who observe it rarely
help wanted
severity3: broken
type: bug/fix
Milestone
Bug Report or Feature Request (mark with an
x
)Command (mark with an
x
)Versions
Repro steps
Say that current
jsxFactory
being set tocreateElement
, given an Angular.tsx
file, like:When building with AOT, the
AngularCompilerPlugin
would applyremoveDecorators
transformer to the build process.As this Angular file contains some decorator (
@Component()
here),removeDecorators
is activated and useselideImports
transformer to remove unused decorator imports.Inside that
elideImports
transformer, it records "all" the used imports, but it doesn't deal with jsx node properly as not transformed yet, so thatjsxFactory
is not an identifier and not being recorded.Then the import being removed and results to a broken file:
The log given by the failure
N/A
Desired functionality
Support
.tsx
in AOT like what in JIT.Mention any other details that might be useful
Suggested labels:
type: bug/fix
,effort1: easy
,freq1: low
,severity3: broken
,workaround2: non-obvious
.The text was updated successfully, but these errors were encountered: