seajs / seajs

A Module Loader for the Web

Home Page:https://seajs.github.io/seajs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

请问 sea.js 支持部分模块打包吗?

2betop opened this issue · comments

hi, sea.js 目前支持 部分模块打包在 a.js 里面,然后 部分模块打包在 b.js 里面吗?

commented

这属于构建部分的逻辑把

是构建的逻辑,但是貌似现在运行时在遇到这种 case 的情况下,会出错误。我是通过 seajs.config({alias:{}}) 映射过去的。存在多个 module 映射到一个 uri 的情况。

commented

@lifesinger 求大神帮忙

commented

如果是多个模块映射到1个文件上的话,alias是对的

@army8735 麻烦看下这个 demo,我认为 alias 什么的都设置对了,但是模块没有正常执行。

https://github.com/2betop/seajs-examples

@army8735 我这块是使用上有问题吗? examples 就是源自 seajs 的官方 demo 中的 hello 。

不同的就是把 main 和 sping 打包到了一块, jquery 没有打包进来,然后 页面也对应的设置了 alias.

seajs.config({alias:{
  "sea-modules/jquery/jquery/1.10.1/jquery": "/sea-modules/jquery/jquery/1.10.1/jquery",
  "static/hello/src/spinning": "/pkg/hello",
  "static/hello/src/main": "/pkg/hello"
}});

现在的问题时,页面没有按预期执行,一片空白。