-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Open
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: compilerIssues related to `ngc`, Angular's template compilerIssues related to `ngc`, Angular's template compilerbugcross-cutting: standaloneIssues related to the NgModule-less worldIssues related to the NgModule-less worldstate: has PR
Milestone
Description
Which @angular/* package(s) are the source of the bug?
Don't known / other
Is this a regression?
No
Description
I have a library that export multiple component in a const as advised in the standalone guide:
const LU_SIMPLE_SELECT_COMPONENTS = [
LuSimpleSelectInputComponent,
LuOptionDirective,
LuDisplayerDirective,
LuOptionComponent,
] as const;Whenever I import this constant from a module or in a component in an application that use my library, I have the following issue:
Value at position 0 in the NgModule.imports of AppModule is not a reference
Value could not be determined statically.
If I redefined the same const in the application, it works.
Links
- The library part
- A Stackblitz that reproduce the issue (uncomment line 24 and comment line 23 to make it works)
Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/angular-ivy-5rgxzc?file=src%2Fapp%2Fapp.module.ts
Please provide the exception or error you saw
> Value at position 0 in the NgModule.imports of AppModule is not a reference
> Value could not be determined statically.
Please provide the environment you discovered this bug in (run ng version)
Angular CLI: 14.1.3
Node: 16.14.2
Package Manager: npm 8.5.0
OS: win32 x64
Angular: 14.1.3
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1401.3
@angular-devkit/build-angular 14.1.3
@angular-devkit/core 14.1.3
@angular-devkit/schematics 14.1.3
@angular/cdk 14.2.7
@schematics/angular 14.1.3
rxjs 7.5.7
typescript 4.7.4
Anything else?
Love Standalone components!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: compilerIssues related to `ngc`, Angular's template compilerIssues related to `ngc`, Angular's template compilerbugcross-cutting: standaloneIssues related to the NgModule-less worldIssues related to the NgModule-less worldstate: has PR