Skip to content
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

迁移@vuepress/client到vuepress/client导致三方插件未适配新版本的全部无法使用 #1502

Closed
1 task done
OrageKK opened this issue Feb 20, 2024 · 4 comments
Closed
1 task done

Comments

@OrageKK
Copy link

OrageKK commented Feb 20, 2024

Description

  • I confirm that this is an issue rather than a question.

Bug report

Steps to reproduce

我的blog引入了vuepress-plugin-oh-my-live2d插件,它已经有些日子不更新了,但之前还一直能用

What is expected?

版本升级应该尽量向前兼容,让一些无人维护的插件还能继续使用

What is actually happening?

import { ClientConfig } from '@vuepress/client';
export * from '@vuepress/client';

/**
 * A helper function to help you define vuepress client config file
 */
declare const defineClientConfig: (clientConfig?: ClientConfig) => ClientConfig;

export { defineClientConfig };

在之前的版本中,我不确定是哪个版本开始的变更,defineClientConfig是从@vuepress/client导出的
现版本是从vuepress/client导出的
以前的插件中的代码仍在使用@vuepress/client,但是新版的@vuepress/client已经没有了defineClientConfig的导出

Reproduction

https://stackblitz.com/edit/vuepress-typ8nz?file=package.json,docs%2F.vuepress%2Fconfig.ts

Used Package Manager

pnpm

System Info

System:
    OS: macOS 13.6.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 196.61 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.5.0 - ~/n/bin/node
    Yarn: Not Found
    npm: 10.2.4 - ~/n/bin/npm
    pnpm: 8.14.0 - ~/Library/pnpm/pnpm
    bun: Not Found
  Utilities:
    Git: 2.39.2 - /usr/bin/git
  Browsers:
    Chrome: 121.0.6167.184
    Edge: Not Found
    Safari: 17.1
  npmPackages:
    @vuepress/bundler-vite: 2.0.0-rc.7 => 2.0.0-rc.7 
    @vuepress/bundler-webpack: Not Found
    @vuepress/cli: Not Found
    @vuepress/client: Not Found
    @vuepress/core: Not Found
    @vuepress/markdown: Not Found
    @vuepress/shared: Not Found
    @vuepress/utils: Not Found
    vue: ^3.4.19 => 3.4.19 
    vue-router: ^4.2.5 => 4.2.5 
    vuepress: 2.0.0-rc.7 => 2.0.0-rc.7
@meteorlxy
Copy link
Member

meteorlxy commented Feb 20, 2024

Fixed by 651dac5

@meteorlxy
Copy link
Member

As a workaround, you may try setting alias: @vuepress/client -> vuepress/client

@OrageKK
Copy link
Author

OrageKK commented Feb 20, 2024

Fixed by d00e9cc

I can't modify other people's plugins, but I hope you can add them at @vuepress/client

export const defineClientConfig = (
clientConfig: ClientConfig = {},
): ClientConfig =>  clientConfig

Make a compatible support for older versions of the plugin

@OrageKK
Copy link
Author

OrageKK commented Feb 20, 2024

Fixed by 651dac5

This modification is the result I expected, thank you, looking forward to his release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants