-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
vite+vitest setup #108
vite+vitest setup #108
Conversation
Can be tested with
|
I cannot reproduce the same vite issue on windows 11. The CI uses windows server 2022, which is closer to windows 10 than windows 11. However I do encounter an issue with vitest on windows 11. The vitest failed with:
cc @bigopon, please have a play with vitest on windows 11. |
Thanks @3cp , nice work on the ability to makes branch. Will test it soon when I get back to my computer. |
What I do know for now: Vite touched imports in the output js of our vite conventions plugin. It changed import { customElement } from "aurelia_runtime-html";
import * as __au2ViewDef from "./my-app.html"; To import { customElement } from "/node_modules/.vite/deps/@aurelia_runtime-html.js?v=aa10f352";
import * as __au2ViewDef from "/src/my-app.html?import"; Then the vite/vitest dev server serves those contents through "root" folder. It seems only vitest+windows has issue with our "/src/my-app.html?import", note the Note it doesn't have issue with "/src/my-app.ts" (the import in my-app.spec.ts which happens before the html import). Would be something with our vite plugin, but only on windows :-( |
Solves the issue in aurelia/new#108
vite-plugin PR created for the above issue. |
Solves the issue in aurelia/new#108
Solves the issue in aurelia/new#108
It seems to work fine with latest dev version (that includes the vite plugin fix) # Next time, you can try to create similar project in silent mode:
npx makes aurelia new-project-name -s dev,typescript,vitest ✓ test/my-app.spec.ts (1)
✓ my-app (1)
✓ should render message
Test Files 1 passed (1)
Tests 1 passed (1)
Start at 23:22:06
Duration 10.44s (transform 121ms, setup 0ms, collect 354ms, tests 39ms, environment 8.65s, prepare 850ms) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work @3cp 👍
Have to wait for another "latest" release, then retest the ci. Not sure about the vite error on the windows server 2022. |
GitHub CI still failed Windows Server 2022 with an error I cannot reproduce on Windows 11. |
From the look of the stack trace, it's not clear at all how/why our plugin influenced the error. Will it have the same issue if we just use vite without our plugin at all? Is that testable? |
Not sure if you can replicate the error with a simple vite app without au2. |
I have not tried, sounds doable. |
This reverts commit 6d5bcf3.
I cannot reproduce the vite + Windows server 2022 error locally on Windows 11 :-( error during build: |
The windows problem might be something to do with mklink in windows, some folder was a "symlink" in that windows server 2022. I will try different e2e folder. |
Nice @3cp 🎉 |
Default app is moved to vite+vitest setup.
Default plugin is still with webpack, as there is some trouble for vite with plugin right now. See comments in
before.js
.