Giter Site home page Giter Site logo

Comments (2)

qiphon avatar qiphon commented on July 17, 2024

alias path.join 改为 path.resolve 之后出现了新的问题

[mor] ✖ 编译 ../node_modules/.pnpm/@vant[email protected]/node_modules/@vant/weapp/lib/field/index.js 失败:
=> Module not found: Error: Can't resolve './index.axml' in '/Users/u/Desktop/project/node_modules/.pnpm/@vant[email protected]/node_modules/@vant/weapp/lib/field'

from morjs.

lyfeyaj avatar lyfeyaj commented on July 17, 2024

可以按照如下步骤尝试:

  1. 确保 MorJS 相关依赖为最新版本
  2. 在转 Web 的配置项中开启 processNodeModules 配置,确保 @vant/weapp 可以正确编译,文档可参考: https://mor.eleme.io/guides/basic/config/#processnodemodules---%E6%98%AF%E5%90%A6%E5%A4%84%E7%90%86-node_modules
  3. 去掉 alias 配置,并在项目中直接按照实际路径引用,比如: "@vant/weapp/popup/index" 或 "@vant/weapp/lib/popup/index"

from morjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.