This repository was archived by the owner on Aug 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 179
代码放二级目录,文件名有多个‘.’时,debug的require的id不正确 #830
Comments
|
第一个没见到有问题,重新安装 spm 试试 |
删了重装了,还能重现
注意 一定得把代码放2级目录才能重现得出来,和package.json放一起是正常的。 代码 |
试了下你提供的包,没有发现问题。 ➜ bug-toomanydot spm3 -V
3.0.2
➜ bug-toomanydot spm3 build
start: build [email protected]
arguments: dest = dist
arguments: cwd = $CWD
arguments: include = relative
arguments: ignore =
arguments: idleading = {{name}}/{{version}}
arguments: install = true
found: [email protected]
found: [email protected]
package: analyse infomation
package: dependencies:
package: files: src/one.js,src/one.two.three.js
output: files: src/one.js
start: task clean
end: task clean
start: task build file src/one.js
start: task build file src/one-debug.js
end: task build file src/one-debug.js
end: task build file src/one.js
start: task build
end: task build
finish: build [email protected] (71ms)
➜ bug-toomanydot cat dist/bug/1.0.0/src/one-debug.js
define("bug/1.0.0/src/one-debug", ["bug/1.0.0/src/one.two.three-debug"], function(require, exports, module) {
require("bug/1.0.0/src/one.two.three-debug");
});
define("bug/1.0.0/src/one.two.three-debug", [], function(require, exports, module) {}); |
试了,还这样 test on Windows 7 sp1 32bit 删了重装spm
运行build
js文件
|
重现了,wins 下确实有问题。 |
到时用新版跑下,我这 win 下测试用例都过了 |
@popomore 新版是哪个? |
还没发— On Wed, Jul 16, 2014 at 8:51 AM, Niphor [email protected] wrote:
|
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
用的spm@3x
spm init
新建个项目将主文件改到src/
下面在
src
里建2个文件one.js
one.two.three.js直接是空白的好了
然后
spm build
打包,得到的one-debug是这样的one.two.three
被require时的名字变成了one.two-debug.three
,而不是正确的one.two.three-debug
线上版因为没自动加-debug,所以没问题。如果用’-‘做分隔符则没问题
另外
明明 one.js只依赖two.js,打包出来之后,three.js也被添加到依赖中了,那么基本有可能上main入口的依赖那是非常非常长的...
我记得之前看到过这个issue,难道没解决?
The text was updated successfully, but these errors were encountered: