-
-
Notifications
You must be signed in to change notification settings - Fork 244
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
fix: undefined viteServer #279
fix: undefined viteServer #279
Conversation
✅ Deploy Preview for analog-app ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for analog-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Thanks! @allcontributors add @sand4rt for code |
I've put up a pull request to add @sand4rt! 🎉 |
@sand4rt the fix has been published in |
@brandonroberts Awesome! BTW, i integrated the plugin in this PR microsoft/playwright#21208. It does run a bit slower than the other frameworks but still acceptable in my opinion. If you have time, i'm very curious about what you think of it and whether you see things that could be improved. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Which package are you modifying?
What is the current behavior?
Build crashes when
process.env['NODE_ENV'] === 'test' || !!process.env['VITEST']
istrue
andviteServer
isundefined
.What is the new behavior?
The build won't crash when
viteServer
isundefined
.Does this PR introduce a breaking change?
Other information
Exploring your repo about Playwright component testing and trying to avoid requiring users to install the Vite plugin and specify the tsconfig.
Hence i'm setting
process.env['NODE_ENV']
environment variable to'test'
so that the Vite plugin can resolve this by it self: https://github.com/analogjs/analog/blob/main/packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts#L53The build will fail when i do this because
viteServer
will beundefined
in this scenario.Related to: microsoft/playwright#14153 (comment)