Giter Club home page Giter Club logo

Comments (5)

errorrik avatar errorrik commented on June 21, 2024

baseId预期是一个module id而不是url

esl是不支持require([])一个url的,这不是标准amd的部分。在requirejs里是支持的,这是一个suger。

在开发应用的时候以模块的视角去考虑整体结构会更自然些

from esl.

Phinome avatar Phinome commented on June 21, 2024

按照规范来说,全局的 require 需要的是一个绝对的模块名称,而不是相对于另一个模块的 ID。AMD Require 定义,不知道这样理解是否合适

from esl.

nighca avatar nighca commented on June 21, 2024

@errorrik 所以当需要加载一个外站模块,合适的做法是先通过 config 配置 pathpackages,然后使用 moduleId 去 require([moduleId]) 这样吗?

from esl.

errorrik avatar errorrik commented on June 21, 2024

是的,标准做法是这样的。如果是非amd模块,需要配个shim

from esl.

nighca avatar nighca commented on June 21, 2024

👌 感谢 erik 大神回复~

from esl.

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.