vuepress / core

Vue-Powered Static Site Generator
https://vuepress.vuejs.org
MIT License
2.17k stars 923 forks source link

[Bug report] #1332

Closed NicolasThierion closed 1 year ago

NicolasThierion commented 1 year ago

Description

I cannot manage to replace theme components with the help of component aliases.

export default defineUserConfig({
  base: "/",

  theme,
  alias: {
    "@theme-hope/components/HomePage": path.resolve(
      __dirname,
      "components/HomePage.vue"
    ),
    "@theme-hope/components/PageFooter": path.resolve(
      __dirname,
      "components/PageFooter.vue"
    ),
  },
});

I use latest version of theme-hope with latest version of vuepress. This used to work with theme-hope@190 & vuepress@^2.0.0-beta.61

Please see a reproduction on this repository.

Thank you šŸ‘.

Reproduction

https://github.com/NicolasThierion/vuepress-component-alias-repro

Used Package Manager

npm

System Info

System:
    OS: Linux 5.4 Manjaro Linux
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 6.98 GB / 15.45 GB
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 18.9.0 - ~/.nvm/versions/node/v18.9.0/bin/node
    Yarn: 1.22.10 - ~/.npm-global/bin/yarn
    npm: 8.19.1 - ~/.nvm/versions/node/v18.9.0/bin/npm
  Utilities:
    Git: 2.39.0 - /usr/bin/git
  Browsers:
    Chrome: Not Found
    Firefox: 108.0.1
  npmPackages:
    @vuepress/bundler-vite:  2.0.0-beta.62 
    @vuepress/bundler-webpack: Not Found
    @vuepress/cli:  2.0.0-beta.62 
    @vuepress/client: 2.0.0-beta.62 => 2.0.0-beta.62 
    @vuepress/core:  2.0.0-beta.62 
    @vuepress/markdown:  2.0.0-beta.62 
    @vuepress/plugin-active-header-links:  2.0.0-beta.62 
    @vuepress/plugin-back-to-top:  2.0.0-beta.62 
    @vuepress/plugin-container:  2.0.0-beta.62 
    @vuepress/plugin-docsearch: Not Found
    @vuepress/plugin-external-link-icon:  2.0.0-beta.62 
    @vuepress/plugin-git:  2.0.0-beta.62 
    @vuepress/plugin-google-analytics: Not Found
    @vuepress/plugin-medium-zoom:  2.0.0-beta.62 
    @vuepress/plugin-nprogress:  2.0.0-beta.62 
    @vuepress/plugin-palette:  2.0.0-beta.62 
    @vuepress/plugin-prismjs:  2.0.0-beta.62 
    @vuepress/plugin-pwa: Not Found
    @vuepress/plugin-pwa-popup: Not Found
    @vuepress/plugin-register-components: Not Found
    @vuepress/plugin-search: Not Found
    @vuepress/plugin-shiki: Not Found
    @vuepress/plugin-theme-data:  2.0.0-beta.62 
    @vuepress/plugin-toc: Not Found
    @vuepress/shared:  2.0.0-beta.62 
    @vuepress/theme-default:  2.0.0-beta.62 
    @vuepress/utils:  2.0.0-beta.62 
    vue: ^3.2.47 => 3.3.2 (3.3.1)
    vue-loader: Not Found
    vue-router:  4.2.0 
    vuepress: 2.0.0-beta.62 => 2.0.0-beta.62 
    vuepress-vite:  2.0.0-beta.62 
    vuepress-webpack: Not Found
Mister-Hope commented 1 year ago

Wrong place. See changelog of vuepress-theme-hope

NicolasThierion commented 1 year ago

I missed that out : { custom: true }

Thank you for your quick response. Problem solved.