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

vant.config.mjs 导入自定义的变量出现路径错误 #13188

Open
zw-store opened this issue Nov 5, 2024 · 0 comments
Open

vant.config.mjs 导入自定义的变量出现路径错误 #13188

zw-store opened this issue Nov 5, 2024 · 0 comments

Comments

@zw-store
Copy link

zw-store commented Nov 5, 2024

重现链接


Vant 版本

4.2.0

描述一下你遇到的问题。

import asideList from './alide'
// throw  Error × Module not found: Can't resolve './alide' in '...path...rspack-virtual-module'
export default {
  name: 'markdown',
  build: {
    css: {
      preprocessor: 'sass',
    },
    site: {
      publicPath: './',
    },
  },
  site: {
    title: 'markdown-app',
    logo: 'https://fastly.jsdelivr.net/npm/@vant/assets/logo.png',
    hideSimulator: false,
    nav: asideList,
  },
}

重现步骤

  • 创建一个 vant-cli-app 后

将 vant-config.mjs nav 进行模块分离

  • 启动项目

得到报错

throw  Error 
× Module not found: Can't resolve './alide' in '...path...rspack-virtual-module'

设备/浏览器

No response

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

No branches or pull requests

1 participant