-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Secondary entry-point package.json
files in APF require mainFields
resolution (in Vitest)
#45326
Comments
Thanks for this issue @Jordan-Hall. I would be happy to look into this. Looking at the current https://github.com/angular/core-builds/blob/master/package.json#L25 In your repository, what would be the steps to reproduce the issue? I assume just |
The reproduction does fail in the |
Hey @devversion https://github.com/Jordan-Hall/vite-angular-template this should be a better test repo. Sorry it's taken so long wanted next beta release off the compiler to be release. |
Not sure if these conditions are valid Native Node conditions? Maybe you should have “import” as a fallback as the last condition? Although it has default condition, which I guess should be a fallback 🤔 |
Thanks for the update @Jordan-Hall. @sheremet-va: Yes, some conditions are custom to allow the Angular CLI/or users to have more control over which output flavor they prefer. Custom conditions are totally valid. As you said, the
e.g. export default defineConfig({
resolve: {
mainFields: ['fesm2020', 'fesm2015', 'module'],
}
}); |
FWIW: I want to remove these secondary |
package.json
files in APF require mainFields
resolution
package.json
files in APF require mainFields
resolutionpackage.json
files in APF require mainFields
resolution (in Vitest)
Closing as this is not an issue with Angular. I provided a workaround, and the issue is now mitigated with the upcoming v14 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Which @angular/* package(s) are the source of the bug?
core, router, Don't known / other
Is this a regression?
No - but not sure
Description
I'm trying to get unit test working with vite test. I've ran into an issue when importing testing modules
This also applies to the router module.
Please provide a link to a minimal reproduction of the bug
https://github.com/Jordan-Hall/vite-angular-template
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
This projects uses NX and prototype of an angular cite plugin.
The text was updated successfully, but these errors were encountered: