简体   繁体   English

jspm中bundle和bundleSFX的主要区别是什么?

[英]What is the main difference between bundle and bundleSFX in jspm?

I have tried harder and harder to understand the difference between bundle and bundle SFX from the documentation of JSPM and system.js. 我越来越努力地从JSPM和system.js的文档中了解bundle和bundle SFX之间的区别。 But I was unable to get the difference. 但我无法发挥作用。 I haven't used jspm till now but I want to use it in my current project. 到目前为止,我还没有使用过jspm,但是我想在当前项目中使用它。

Another question - If I am importing different modules in a.js and different modules in b.js, where both a.js and b.js are mutually exclusive, can I bundle both of them in a single file c.js using JSPM? 另一个问题-如果我要导入a.js中的不同模块和b.js中的a.js和b.js互斥的模块,我是否可以使用JSPM将它们捆绑在单个文件c.js中?

Please help, I would really appreciate it. 请帮忙,我真的很感激。

To create an output distributable script file that can be included entirely on its own independent of SystemJS and jspm, we can use bundle-sfx. 要创建可以完全独立于SystemJS和jspm单独包含的输出可分发脚本文件,我们可以使用bundle-sfx。

jspm bundle-sfx app/main.js app.js app.js

contains a micro-loader implementation (1.4KB gzipped), converts all module formats into ES5 (including compiling ES6), and maintaining bindings and circular references as with normal bundles. 包含一个微加载器实现(1.4KB gzip),将所有模块格式转换为ES5(包括编译ES6),并像普通bundle一样维护绑定和循环引用。

Source: http://jspm.io/docs/production-workflows.html 资料来源: http : //jspm.io/docs/production-workflows.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM