-
Notifications
You must be signed in to change notification settings - Fork 2
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: specify vite as peer dep #7
base: main
Are you sure you want to change the base?
Conversation
"@vitejs/plugin-basic-ssl": "^1.1.0", | ||
"@vitejs/plugin-legacy": "^6.0.0", | ||
"@vitejs/plugin-basic-ssl": "^1.2.0", | ||
"@vitejs/plugin-legacy": "^6.0.1", |
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.
technically out of scope but figured why not 🤷♂️
"@vitejs/plugin-basic-ssl": "^1.1.0", | ||
"@vitejs/plugin-legacy": "^6.0.0", | ||
"@vitejs/plugin-basic-ssl": "^1.2.0", | ||
"@vitejs/plugin-legacy": "^6.0.1", | ||
"eruda": "^3.4.1", | ||
"terser": "^5.36.0", |
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.
curious if terser is needed as an explicit dep?
"devDependencies": { | ||
"@webxdc/types": "latest", | ||
"prettier": "latest", | ||
"typescript": "latest", | ||
"vite": "latest" | ||
"vite": "6.1.0" |
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.
generally better practice to specify a more explicit version range. can revert if not desired though
when creating plugins, you should specify the versions of vite that are compatible with the plugin by declaring it as a peer dependency. doing it as a peer instead of a direct dep is preferred as it allows the end-user to dictate the version of vite that's used in the project. this will also be helpful towards #5
this also:
@vitejs/plugin-basic-ssl
to the latest version in order to have proper compatibility with vite@6.@vitejs/plugin-legacy
to latestthe noted compatible versions of vite that i've set here are kind of arbitrary. not really sure what the ideal is aside from the latest major, but figured that this plugin is very likely compatible with vite@5 as well so it'd be worth allowing that for the sake of easier adoption.EDIT: nevermind, it probably needs to be v6 only since@vitejs/plugin-legacy
requires v6 as a peer dep