-
Notifications
You must be signed in to change notification settings - Fork 922
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
[Proposal]: Deprecate vuepress-vite and vuepress-webpack #1446
Labels
Comments
This proposal also requires a create helper |
meteorlxy
added a commit
that referenced
this issue
Dec 27, 2023
) BREAKING CHANGE: `vuepress-vite` and `vuepress-webpack` packages have been removed, and the corresponding commands have been moved to `vuepress` package. With `vuepress` command, you need to install bundler package and set bundler in config file manually. With `vuepress-vite` and `vuepress-webpack` command, you still need to install bundler package, but you can omit bundler option in config file. Co-authored-by: meteorlxy <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Clear and concise description of the problem
Useless packages
vuepress-vite
andvuepress-webpack
are just be used as alias of calling bundler vite/webpack. ( I am not seeing any different use case from downstream. If a user want an advanced usage to "programly call vuepress in scripts", they all choose to import@vuepress/cli
and handle the process themselves.So under this situation I think
vuepress-vite
andvuepress-webpack
are a bit useless as users install them only for thevuepress-vite
andvuepress-webpack
bin.Version mismatch
Also users often complains version mismatch. Vue solves this by reexporting pacakges at
vue
, e.g.:vue/reactivity
for@vue/reactivity
export,vue/compiler-sfc
for@vue/compiler-sfc
. We can do this too.Suggested solution
Currently, if we drop support of yarn1, and only support pnpm>7 npm>8, we can use optionalPeers feature.
This solves the problem that users often triggers a version mismatch with vuepress, and is extactly what vue is doing.
We should deprecate
vuepress-vite
andvuepress-package
, and set@vuepress/bundler-vite
and@vuepress/bundler-webpack
as optional peers. Also, we can reexportcore
markdown
client
shared
in vuepress:We can then provide
try catch
to perform bundler detecting/requiring and a new bundler flag if users are missing bundler field.When users only install 1 bundler, we use that bundler for him.
# automatically use the installed bundler vuepress dev src
When users install no bundler, we throw an error:
The re-export helps avoid the version mismatch problem and simple plugin/theme deps:
The text was updated successfully, but these errors were encountered: