GithubHelp home page GithubHelp logo

Comments (6)

leeight avatar leeight commented on July 25, 2024

@treelite 发一下你们的 module.conf,让我瞅瞅你们是怎么用的。

from edp-build.

treelite avatar treelite commented on July 25, 2024

目前还没有实际应用,只是遇到了这类需求,暂时通过改变 moduleId 来绕过去了。期待的方式是完整支持map配置,比如这样:

{
    "baseUrl": "src",
    "packages:": [
        {
            "name": "lang",
            "location": "../dep/lang/1.0.0/src"
        },
        {
            "name": "lang-2",
            "location": "../dep/lang/2.0.0/src"
        }
    ],
    "map": {
        "biz1": {
            "lang": "lang-2"
        }
    }
}

全局使用 lang1.0.0,单独在 biz1 模块中使用 2.0.0 版本,以此来解决项目同一个第三方模块多版本并存的问题

from edp-build.

leeight avatar leeight commented on July 25, 2024

这个 esl 就会处理了,edp build 不需要做啥额外的工作耶

from edp-build.

treelite avatar treelite commented on July 25, 2024

嗯 嗯, 模块编译部分应该不用改~ 不过在 combine 的时候是否需要考虑自动合并 map 过的依赖?目前的话还是需要手动指定包含 lang-2 模块

from edp-build.

leeight avatar leeight commented on July 25, 2024

@treelite 你的意思是在合并biz1代码的时候,把lang-2的依赖也加入进去,是么?

// biz1.js
define(function (require) {
    require('lang');
});

经过build之后,最终的输出是这样子

// biz1.compiled.js
define('lang-2', function (){});
define('biz1', function() {
    require('lang');
});

结果正确么?@errorrik @erik168

from edp-build.

leeight avatar leeight commented on July 25, 2024

@treelite 试试最新的npm i -g edp-build@beta,看看是否OK了,我新增的几个测试用例貌似可以跑通过,你就看看如果没有你们特殊的处理,build之后的项目是否可以work。

from edp-build.

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.