feat(vite): unspecify vite version support - #17
Open
nicojs wants to merge 1 commit into
Open
Conversation
Don't be specific about the vite version. This will allow all users to update at their own pace. Indeed, new versions of vite _might_ break `karma-vite`, but since we're using a stable API it probably wont.
Closed
|
Would be lovely if you can merge this @credred 🙏 |
|
Adding this to package.json is a workaround until this PR is merged @nicojs |
|
I just wanted to confirm I just used |
nicojs
pushed a commit
to stryker-mutator/stryker-js
that referenced
this pull request
Oct 4, 2025
…#5294)" (#5502) * chore(e2e): also remove force from package.json * fix(karma): override karma-vite dependency Using the workaround provided as mentioned in: credred/karma-vite#17
rajsite
added a commit
to ni/nimble
that referenced
this pull request
Dec 12, 2025
rajsite
added a commit
to ni/nimble
that referenced
this pull request
Dec 13, 2025
# Pull Request ## 🤨 Rationale Uses vite instead of webpack for running karma tests. Has the following benefits: - Fast enough to target `.ts` source files so can avoid needing to build manually first - Starts running tests almost immediately (2-3 seconds) instead of waiting for tdd, i.e. a components build followed by a full webpack build (30-40 seconds) - Improves workflow of focus a specific set of tests and run tests - Reduces times on `nimble-component:test` on CI by about 10-15s (net impact on full CI is minimal due to concurrency) ## 👩💻 Implementation - Switch to karma-vite in karma config files - Remove webpack deps from components - Had to add overrides to use newer vite versions until it's addressed in karma-vite, see: credred/karma-vite#17 - Looks like overrides only have an impact on root package.json: https://docs.npmjs.com/cli/v11/configuring-npm/package-json#overrides - Also added a `build-components` top-level helper command - Also aligned the browsers we test against across packages ## 🧪 Testing Try it yourself, pretty amazing. - Sync repo and npm install - `npm run build-components` - Focus a test (i.e. `fdescribe`), for example in `nimble-components` (note that means source has changed since build) - `npm run test-chrome`, should run against the latest source quickly and finish Local run and CI ## ✅ Checklist - [x] I have updated the project documentation to reflect my changes or determined no changes are needed. --------- Co-authored-by: rajsite <1588923+rajsite@users.noreply.github.com>
|
Any chance this can be merged soon @credred ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Don't be specific about the vite version. This will allow all users to update at their own pace. Indeed, new versions of vite might break
karma-vite, but since we're using a stable API it probably wont.