Comments (6)
@treelite 发一下你们的 module.conf,让我瞅瞅你们是怎么用的。
from edp-build.
目前还没有实际应用,只是遇到了这类需求,暂时通过改变 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"
}
}
}
全局使用 lang
是 1.0.0
,单独在 biz1
模块中使用 2.0.0
版本,以此来解决项目同一个第三方模块多版本并存的问题
from edp-build.
这个 esl 就会处理了,edp build 不需要做啥额外的工作耶
from edp-build.
嗯 嗯, 模块编译部分应该不用改~ 不过在 combine
的时候是否需要考虑自动合并 map
过的依赖?目前的话还是需要手动指定包含 lang-2
模块
from edp-build.
@treelite 你的意思是在合并biz1
代码的时候,把lang-2
的依赖也加入进去,是么?
// biz1.js
define(function (require) {
require('lang');
});
经过build
之后,最终的输出是这样子
// biz1.compiled.js
define('lang-2', function (){});
define('biz1', function() {
require('lang');
});
from edp-build.
@treelite 试试最新的npm i -g edp-build@beta
,看看是否OK了,我新增的几个测试用例貌似可以跑通过,你就看看如果没有你们特殊的处理,build之后的项目是否可以work。
from edp-build.
Related Issues (20)
- md5-renamer 遇到带空格的路径,没有去空格导致windows下输出错误 HOT 1
- ModuleCompiler处理paths的时候,需要支持 https? 的配置
- babel-processor和tpl-merge配合使用的问题 HOT 4
- 项目引用less > 2.0.0,LessCompiler的relativeUrls没有效果
- 增加处理器缓存支持能力,提升构建速度
- file-info 模块单独提取出来便于扩展依赖使用 HOT 1
- replace-tag-attribute 在特定情况下不符合预期 HOT 1
- 模块编译在有`define`声明的情况下修改脚本导致错误 HOT 3
- HTML minifier 提示找不到模块 HOT 2
- module processor在combine配置文件的时候报错 HOT 1
- html-minifer 内置 etpl customAttrSurround 配置 HOT 1
- babelProcessor 需要改用babel-core以支持babel6
- 增加JsCompressor的利用多核CPU的能力
- 一个自动化打包构建的思路 HOT 1
- v1.2.0+ 版本build后有保留字的内容不会特殊处理
- less-compiler的bug or feature? HOT 2
- pathMapper issue
- 编译less丢失css私有前缀
- PathMapper中对amdConfig的对象的eval带来的副作用
- JsCompressor 能不能支持下 es6?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edp-build.