谈谈这几天使用 SeaJS 的感受
A few days ago, I learned about the four modular specifications, and I have used the other three specifications. With webpack, the ES6 specification is very comfortable, with documentation and plugins, but it needs compilation, which is a bit of a hassle. Sea.js, which can be run directly in the browser, is very interesting to me. After looking at the source code, I have a general understanding of the module loading mechanism, and it is not based on the project directory, but on the location of Sea.js or relative to window.location. However, there is a very big problem. It seems that many libraries need to modify the source code, such as Vue.js and Jquery.js. Vue also supports AMD. There is documentation, but it is very basic, and there is no in-depth place. Basically, after defining a module, it is written in ordinary JavaScript. This framework gives me the feeling that it is a transitional stage from native JavaScript to ES6. Before ES6, Sea.js and RequireJS are both excellent choices for JavaScript modularization. However, with the emergence of ES6, even ES7, and the addition of various compilation and packaging tools and transcoding tools, and the support of various open-source modules on npm, ES6 has become the preferred choice for modular programming, and many people have already made wheels for you, and you need to find one on npm, then require or import, and then compile and package, and even support IE9.
内容来源: seajs/seajs