{"id":285185,"date":"2017-04-19T11:50:44","date_gmt":"2017-04-19T07:50:44","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=285185"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=285185","title":{"rendered":"\u041d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 ECMAScript \u043c\u043e\u0434\u0443\u043b\u0438 \u2014 \u043f\u0435\u0440\u0432\u044b\u0439 \u043e\u0431\u0437\u043e\u0440"},"content":{"rendered":"<p><a href=\"https:\/\/habrahabr.ru\/company\/tuturu\/blog\/326716\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/be1\/220\/2ad\/be12202ad80598308949f8bfe6b8b728.png\" alt=\"\u0411\u0430\u043d\u0434\u043b\u0435\u0440\u044b \u0438 \u043a\u043e\u043c\u043f\u0430\u0439\u043b\u0435\u0440\u044b \u043f\u0440\u043e\u0442\u0438\u0432 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439\"\/><\/a><\/p>\n<p>  <i>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u043c \u0441\u0442\u0430\u0442\u044c\u0438 \u043e \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 <a href=\"http:\/\/www.ecma-international.org\/ecma-262\/6.0\/#sec-modules\">ECMAScript \u043c\u043e\u0434\u0443\u043b\u044f\u0445<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0441\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u044e\u0442\u0441\u044f \u0441\u0440\u0435\u0434\u0438 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0435\u0440\u043e\u0432. Javascript \u0440\u0430\u043d\u0435\u0435 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b \u043d\u0430\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438, \u0438 \u043d\u0430\u043c, \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0435\u0440\u0430\u043c, \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438. \u041d\u043e \u0432\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u0432 \u0441\u043a\u043e\u0440\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Webpack \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0430\u043d\u0434\u043b\u043e\u0432 \u043c\u043e\u0434\u0443\u043b\u0435\u0439. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u043c\u0438\u0440, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u0437\u0430 \u0432\u0430\u0441. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u0438\u0445 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u0430\u0445 \u044f \u0438 \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c.<\/i><br \/>  <a name=\"habracut\"><\/a><br \/>  \u0412 2016 \u0433\u043e\u0434\u0443 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u0438 Nodejs \u0431\u044b\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0444\u0438\u0447 \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0441\u0442\u0435\u0439 \u0438\u0437 \u043d\u043e\u0432\u044b\u0445 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u0432, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 <a href=\"http:\/\/www.ecma-international.org\/ecma-262\/6.0\/\">ECMAScript 2015<\/a>. \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u0441 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0435\u0439, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0441\u0440\u0435\u0434\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432 \u0431\u043b\u0438\u0437\u043a\u0430 \u043a 100%:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/cfe\/bcf\/4f0\/cfebcf4f0aa44d4d81469fb60fdf0625.png\" alt=\"\u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 EcmaScript 6\"\/><\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0432\u0432\u0435\u0434\u0435\u043d\u044b <a href=\"http:\/\/www.ecma-international.org\/ecma-262\/6.0\/#sec-modules\">ECMAScript \u043c\u043e\u0434\u0443\u043b\u0438<\/a> (\u0447\u0430\u0441\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 ES\/ES6 \u043c\u043e\u0434\u0443\u043b\u0438). \u042d\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0430 \u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0438 \u043d\u0438 \u043e\u0434\u0438\u043d \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u043e\u043a\u0430 \u043d\u0435 \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b \u0438\u0445 \u0432 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<p>  \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0432 Safari 19 Technical Preview \u0438 Edge 15 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u043b\u0430\u0433\u043e\u0432. \u0423\u0436\u0435 \u0431\u043b\u0438\u0437\u0438\u0442\u0441\u044f \u0442\u043e \u0432\u0440\u0435\u043c\u044f, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0445 \u0432\u0441\u0435\u043c \u0431\u0430\u043d\u0434\u043b\u043e\u0432 \u0438 \u0442\u0440\u0430\u043d\u0441\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u043c\u0438\u0440 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0430 \u043f\u0440\u0438\u0448\u0435\u043b \u043a \u044d\u0442\u043e\u043c\u0443, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0447\u043d\u0435\u043c \u0441 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 JS \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 ES6 \u043c\u043e\u0434\u0443\u043b\u0435\u0439.<\/p>\n<h2>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0440\u0438\u0438<\/h2>\n<p>  \u0411\u044b\u043b\u043e \u043c\u043d\u043e\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439. \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445:<\/p>\n<p>  1. \u041f\u0440\u043e\u0441\u0442\u043e \u0434\u043b\u0438\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432\u043d\u0443\u0442\u0440\u0438 script \u0442\u0435\u0433\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"javascript\">&lt;!--html--&gt; &lt;script type=&quot;application\/javascript&quot;&gt;     \/\/ module1 code     \/\/ module2 code &lt;\/script&gt; <\/code><\/pre>\n<p>  2. \u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u0438\u043a\u0438 \u043c\u0435\u0436\u0434\u0443 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0435\u0433\u043e\u0432 script:  <\/p>\n<pre><code class=\"javascript\">\/* js *\/  \/\/ module1.js     \/\/ module1 code  \/\/ module2.js     \/\/ module2 code <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"javascript\">&lt;!--html--&gt; &lt;script type=&quot;application\/javascript&quot; src=&quot;PATH\/module1.js&quot; &gt;&lt;\/script&gt; &lt;script type=&quot;application\/javascript&quot; src=&quot;PATH\/module2.js&quot; &gt;&lt;\/script&gt; <\/code><\/pre>\n<p>  3. \u041c\u043e\u0434\u0443\u043b\u044c \u043a\u0430\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: \u043c\u043e\u0434\u0443\u043b\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0447\u0442\u043e-\u0442\u043e; \u0441\u0430\u043c\u043e\u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440) + Application \u0444\u0430\u0439\u043b\/\u043c\u043e\u0434\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0442\u043e\u0447\u043a\u043e\u0439 \u0432\u0445\u043e\u0434\u0430 \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"javascript\">\/\/ polyfill-vendor.js (function(){     \/\/ polyfills-vendor code }());  \/\/ module1.js function module1(params){     \/\/ module1 code     return module1; }  \/\/ module3.js function module3(params){     this.a = params.a; }  module3.prototype.getA = function(){     return this.a; };  \/\/ app.js var APP = {};  if(isModule1Needed){     APP.module1 = module1({param1:1}); }  APP.module3 = new module3({a: 42}); <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"javascript\">&lt;!--html--&gt; &lt;script type=&quot;application\/javascript&quot; src=&quot;PATH\/polyfill-vendor.js&quot; &gt;&lt;\/script&gt; &lt;script type=&quot;application\/javascript&quot; src=&quot;PATH\/module1.js&quot; &gt;&lt;\/script&gt; &lt;script type=&quot;application\/javascript&quot; src=&quot;PATH\/module2.js&quot; &gt;&lt;\/script&gt; &lt;script type=&quot;application\/javascript&quot; src=&quot;PATH\/app.js&quot; &gt;&lt;\/script&gt; <\/code><\/pre>\n<p>  \u041a\u043e \u0432\u0441\u0435\u043c\u0443 \u044d\u0442\u043e\u043c\u0443 Frontend \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e \u0438\u0437\u043e\u0431\u0440\u0435\u043b\u043e \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u043e\u0432\u0438\u0434\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u043d\u043e\u0432\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b\u0438 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0435 \u0432 \u044d\u0442\u043e\u0442 \u043f\u0440\u0430\u0437\u0434\u043d\u0438\u043a \u0430\u043d\u0430\u0440\u0445\u0438\u0438.<\/p>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0438\u0434\u0435\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u0430\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043e\u0434\u043d\u0443 \u0441\u0441\u044b\u043b\u043a\u0443 JS \u0444\u0430\u0439\u043b\u0430, \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"javascript\">&lt;!--html--&gt; &lt;script type=&quot;application\/javascript&quot; src=&quot;PATH\/app.js&quot; &gt;&lt;\/script&gt; <\/code><\/pre>\n<p>  \u041d\u043e \u0432\u0441\u0451 \u0441\u0432\u0435\u043b\u043e\u0441\u044c \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0431\u0430\u043d\u0434\u043b\u0435\u0440\u043e\u0432 \u2014 \u0441\u0438\u0441\u0442\u0435\u043c \u0441\u0431\u043e\u0440\u043a\u0438 \u043a\u043e\u0434\u0430. \u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0432 JavaScript.<\/p>\n<h2>\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f (<a href=\"https:\/\/en.wikipedia.org\/wiki\/Asynchronous_module_definition\">AMD<\/a>)<\/h2>\n<p>  \u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0448\u0438\u0440\u043e\u043a\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 <a href=\"http:\/\/requirejs.org\">RequireJS<\/a> \u0438 \u0432 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0445, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a <a href=\"https:\/\/github.com\/requirejs\/r.js\">r.js<\/a> \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0435\u0433\u043e \u0431\u0430\u043d\u0434\u043b\u0430. \u041e\u0431\u0449\u0438\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441:<\/p>\n<pre><code class=\"javascript\">\/\/ polyfill-vendor.js define(function () {     \/\/ polyfills-vendor code });  \/\/ module1.js define(function () {     \/\/ module1 code     return module1; });  \/\/ module2.js define(function (params) {     var a = params.a;      function getA(){         return a;     }      return {         getA: getA     } });  \/\/ app.js define(['PATH\/polyfill-vendor'] , function () {     define(['PATH\/module1', 'PATH\/module2'] , function (module1, module2) {         var APP = {};          if(isModule1Needed){             APP.module1 = module1({param1:1});         }          APP.module2 = new module2({a: 42});     }); }); <\/code><\/pre>\n<p>  <\/p>\n<h2><a href=\"https:\/\/en.wikipedia.org\/wiki\/CommonJS\">CommonJS<\/a><\/h2>\n<p>  \u042d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0432 Node.js \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0430\u043d\u0434\u043b\u043e\u0432 \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <a href=\"http:\/\/browserify.org\">Browserify<\/a>. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 \u2014 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043d\u0435\u043f\u0440\u0435\u0434\u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e\u0439 \u0443\u0442\u0435\u0447\u043a\u0438 \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"javascript\">\/\/ polyfill-vendor.js     \/\/ polyfills-vendor code  \/\/ module1.js     \/\/ module1 code     module.exports= module1;  \/\/ module2.js module.exports= function(params){     const a = params.a;      return {         getA: function(){             return a;         }     }; };  \/\/ app.js require('PATH\/polyfill-vendor');  const module1 = require('PATH\/module1'); const module2 = require('PATH\/module2');  const APP = {};  if(isModule1Needed){     APP.module1 = module1({param1:1}); }  APP.module2 = new module2({a: 42}); <\/code><\/pre>\n<p>  <\/p>\n<h2>ECMAScript \u043c\u043e\u0434\u0443\u043b\u0438 (\u0430\u043a\u0430 ES6\/ES2015\/\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 JavaScript \u043c\u043e\u0434\u0443\u043b\u0438)<\/h2>\n<p>  \u0415\u0449\u0435 \u043e\u0434\u0438\u043d \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u043f\u0440\u0438\u0448\u0435\u043b \u043a \u043d\u0430\u043c \u0441 ES2015. \u0412 \u043d\u043e\u0432\u043e\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u044e\u0449\u0438\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044f\u043c \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0430, \u0442\u0430\u043a\u0438\u043c \u043a\u0430\u043a:<\/p>\n<ul>\n<li>\u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439<\/li>\n<li>\u0441\u0442\u0440\u043e\u0433\u0438\u0439 \u0440\u0435\u0436\u0438\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/li>\n<li>\u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438<\/li>\n<li>\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043b\u0435\u0433\u043a\u043e \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u043a\u043e\u0434, \u0441\u043e\u0431\u043b\u044e\u0434\u0430\u044f \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e<\/li>\n<\/ul>\n<p>  \u0415\u0441\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u043e\u0432, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432 \u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u043e\u0434\u043d\u0443 \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u044d\u0442\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<ul>\n<li><a href=\"https:\/\/webpack.github.io\">Webpack<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/systemjs\/systemjs\">SystemJS<\/a><\/li>\n<li><a href=\"http:\/\/jspm.io\">JSPM<\/a><\/li>\n<li><a href=\"https:\/\/babeljs.io\">Babel<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/umdjs\/umd\">UMD<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b<\/h2>\n<p>  \u041d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u0434\u0435\u043d\u044c \u0432 JavaScript \u043c\u044b \u043f\u0440\u0438\u0432\u044b\u043a\u043b\u0438 \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439. \u0415\u0441\u043b\u0438 \u043c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e ECMAScript \u043c\u043e\u0434\u0443\u043b\u044f\u0445, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/rollup\/rollup\">Rollup<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/google\/traceur-compiler\">Traceur Compiler<\/a><\/li>\n<li><a href=\"https:\/\/babeljs.io\">Babel<\/a>, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f <a href=\"https:\/\/babeljs.io\/docs\/plugins\/transform-es2015-modules-commonjs\/\">\u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f ES2015 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0432 CommonJS<\/a><\/li>\n<li><a href=\"https:\/\/webpack.github.io\/docs\/roadmap.html\">Webpack 2<\/a> \u0441\u043e \u0441\u0432\u043e\u0438\u043c Tree Shaking (\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u0434\u0430)<\/li>\n<li>TypeScript \u2014 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0440\u0430\u043d\u0441\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430<\/li>\n<\/ul>\n<p>  \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 CLI \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0430\u043d\u0434\u043b\u043e\u0432 \u0438\u0437 \u0432\u0430\u0448\u0438\u0445 JS \u0444\u0430\u0439\u043b\u043e\u0432. \u041e\u043d \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0442\u043e\u0447\u043a\u0438 \u0432\u0445\u043e\u0434\u0430 \u0438 \u043d\u0430\u0431\u043e\u0440 \u0444\u0430\u0439\u043b\u043e\u0432. \u041e\u0431\u044b\u0447\u043d\u043e \u0442\u0430\u043a\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u201cuse strict\u201d. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0442\u0430\u043a\u0436\u0435 \u0443\u043c\u0435\u044e\u0442 \u0442\u0440\u0430\u043d\u0441\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u043e \u0432\u0441\u0435\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e (\u0441\u0442\u0430\u0440\u044b\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b, Node.js \u0438 \u0442.\u0434.).<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u043e\u0439 WebPack \u043a\u043e\u043d\u0444\u0438\u0433, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u0447\u043a\u0443 \u0432\u0445\u043e\u0434\u0430 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 Babel \u0434\u043b\u044f \u0442\u0440\u0430\u043d\u0441\u043f\u0438\u043b\u044f\u0446\u0438\u0438 JS \u0444\u0430\u0439\u043b\u043e\u0432:<\/p>\n<pre><code class=\"javascript\">\/\/ webpack.config.js const path = require('path');  module.exports = {   entry: path.resolve('src', 'webpack.entry.js'),   output: {     path: path.resolve('build'),     filename: 'main.js',     publicPath: '\/'   },   module: {     loaders: {      &quot;test&quot;: \/\\.js?$\/,      &quot;exclude&quot;: \/node_modules\/,      &quot;loader&quot;: &quot;babel&quot;    }   } }; <\/code><\/pre>\n<p>  \u041a\u043e\u043d\u0444\u0438\u0433 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439:  <\/p>\n<ol>\n<li>\u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0441 \u0444\u0430\u0439\u043b\u0430 webpack.entry.js<\/li>\n<li>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Babel \u043b\u043e\u0443\u0434\u0435\u0440 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 JS (\u0442\u043e \u0435\u0441\u0442\u044c, \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0442\u0440\u0430\u043d\u0441\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u0440\u0435\u0441\u0435\u0442\u043e\u0432\/\u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 + \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0431\u0430\u043d\u0434\u043b)<\/li>\n<li>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b main.js<\/li>\n<\/ol>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0444\u0430\u0439\u043b index.html \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"javascript\">&lt;script src=&quot;build\/main.js&quot;&gt;&lt;\/script&gt; <\/code><\/pre>\n<p>  \u0418 \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0431\u0430\u043d\u0434\u043b\u044b\/\u0442\u0440\u0430\u043d\u0441\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043a\u043e\u0434 JS. \u042d\u0442\u043e \u043e\u0431\u0449\u0438\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0430\u043d\u0434\u043b\u0435\u0440\u0430\u043c\u0438, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0431\u0430\u043d\u0434\u043b\u043e\u0432.<\/p>\n<h2>\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b JavaScript \u043c\u043e\u0434\u0443\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435<\/h2>\n<p>  <\/p>\n<h3>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0411\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432<\/h3>\n<p>  \u041d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u0434\u0435\u043d\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432 \u0438\u043c\u0435\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 ES6:<\/p>\n<ul>\n<li>Firefox \u2014 <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=568953\">\u0432 \u0441\u0442\u0430\u0434\u0438\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/a><\/li>\n<li>Chrome \u2014 <a href=\"https:\/\/www.chromestatus.com\/features\/5365692190687232\">\u0432 \u0441\u0442\u0430\u0434\u0438\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/a><\/li>\n<li>EDGE \u2014 <a href=\"https:\/\/developer.microsoft.com\/en-us\/microsoft-edge\/platform\/status\/moduleses6\/?q=module\">\u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043f\u043e\u0434 \u0444\u043b\u0430\u0433\u043e\u043c \u0432 EDGE 15 Preview Build 14342+<\/a><\/li>\n<li>Webkit \u2014 <a href=\"https:\/\/webkit.org\/status\/#feature-modules\">\u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Safari Technology Preview 21+<\/a><\/li>\n<li>Node.js \u2014 <a href=\"https:\/\/github.com\/nodejs\/node-eps\/blob\/master\/002-es6-modules.md\">\u043d\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0438, \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<h3>\u0413\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c<\/h3>\n<p>  \u041a\u0430\u043a \u0432\u044b \u0432\u0438\u0434\u0435\u043b\u0438, \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 JS \u043c\u043e\u0434\u0443\u043b\u0438 \u0432 Safari Technology Preview 19+ \u0438 EDGE 15 Preview Build 14342+. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043a\u0430\u0447\u0430\u0435\u043c \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u0438 \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438.<\/p>\n<h3>Safari Technology Preview \u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 ES \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438<\/h3>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 MacOS, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e Safari Technology Preview (TP) \u0441 <a href=\"https:\/\/developer.apple.com\/safari\/download\/\">developer.apple.com<\/a>. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0438 \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0435\u0433\u043e. \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 <a href=\"https:\/\/webkit.org\/blog\/7265\/release-notes-for-safari-technology-preview-21\/&amp;usg=ALkJrhhr4bTdQdc6nyahpX_BoyjStLUXbg\">Safari Technology Preview \u0432\u0435\u0440\u0441\u0438\u0438 21+<\/a>, \u043c\u043e\u0434\u0443\u043b\u0438 ES \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u044d\u0442\u043e Safari TP 19 \u0438\u043b\u0438 20, \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e ES6 \u043c\u043e\u0434\u0443\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b: \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u043c\u0435\u043d\u044e \u00abDevelop\u00bb -&gt; \u00abExperimental Features\u00bb -&gt; \u00abES6 Modules\u00bb.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/6cc\/7b5\/9b6\/6cc7b59b6c3449acbbf4f3f78f4304e2.gif\" alt=\"image\"\/><\/p>\n<p>  \u0414\u0440\u0443\u0433\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 <a href=\"https:\/\/webkit.org\/downloads\/\">\u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e Webkit Nightly<\/a> \u0438 \u0438\u0433\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0438\u043c.<\/p>\n<h3>EDGE 15 \u2014 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c ES \u043c\u043e\u0434\u0443\u043b\u0438<\/h3>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 <a href=\"https:\/\/developer.microsoft.com\/en-us\/microsoft-edge\/tools\/vms\/&amp;usg=ALkJrhjbzpNayQs6n4C61o2ygvZNJFqAIA\">\u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0443\u044e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 \u043e\u0442 Microsoft<\/a>.<\/p>\n<p>  \u041f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 (VM) \u00abMicrosoft EDGE \u043d\u0430 Win 10 Preview (15.XXXXX)\u00bb \u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00abVirtual Box\u00bb (\u0442\u0430\u043a\u0436\u0435 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e) \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b.<\/p>\n<p>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443, \u0434\u0430\u043b\u0435\u0435 \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 EDGE.<\/p>\n<p>  \u0417\u0430\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 about:flags \u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0444\u043b\u0430\u0433 \u00ab\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 JavaScript\u00bb (Enable experimental JavaScript features).<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/157\/daf\/5ab\/157daf5ab9b64a70a97ecb085f4f2055.png\"\/><\/p>\n<p>  \u0412\u043e\u0442 \u0438 \u0432\u0441\u0435, \u0442\u0435\u043f\u0435\u0440\u044c \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0440\u0435\u0434, \u0433\u0434\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0433\u0440\u0430\u0442\u044c \u0441 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 ECMAScript.<\/p>\n<h2>\u041e\u0442\u043b\u0438\u0447\u0438\u044f \u0440\u043e\u0434\u043d\u044b\u0445 \u0438 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439<\/h2>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0447\u043d\u0435\u043c \u0441 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u043c\u043e\u0434\u0443\u043b\u0435\u0439:<\/p>\n<ol>\n<li>\u041a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0438\u043c\u0435\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439.<\/li>\n<li>\u041e\u043d\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432 \u0441\u0442\u0440\u043e\u0433\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435, \u0434\u0430\u0436\u0435 \u043a\u043e\u0433\u0434\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 \u00abuse strict\u00bb \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u0430.<\/li>\n<li>\u041c\u043e\u0434\u0443\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/developer.mozilla.org\/en\/docs\/Web\/JavaScript\/Reference\/Statements\/import&amp;usg=ALkJrhhu317ObZLoOW9_S-p5MUHXxtJwGw\">import \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b<\/a>.<\/li>\n<li>\u041c\u043e\u0434\u0443\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Statements\/export\">export<\/a>.<\/li>\n<\/ol>\n<p>  \u0414\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043c\u044b \u043d\u0435 \u0443\u0432\u0438\u0434\u0435\u043b\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u044f \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a \u0447\u0435\u043c\u0443 \u043c\u044b \u043f\u0440\u0438\u0432\u044b\u043a\u043b\u0438 \u0441 \u0431\u0430\u043d\u0434\u043b\u0435\u0440\u0430\u043c\u0438. \u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0430 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c script \u0442\u0435\u0433 \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u043c type=\u00abmodule\u00bb, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"javascript\"> &lt;script type= &quot;module&quot; scr= &quot;PATH\/file.js&quot; &gt;&lt;\/script&gt; <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0443, \u0447\u0442\u043e \u0432\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0438\u043c\u043f\u043e\u0440\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432, \u0438 \u043e\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b. \u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0434\u0435\u0441\u044c:  <\/p>\n<blockquote><p>\u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 JavaScript \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u0438, \u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u0438 \u0442\u0430\u043a \u043f\u043e \u0441\u0443\u0442\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u043c?<\/p><\/blockquote>\n<p>  <a href=\"https:\/\/www.nczonline.net\/blog\/2016\/04\/es6-module-loading-more-complicated-than-you-think\/\">\u041e\u0434\u043d\u0430 \u0438\u0437 \u043f\u0440\u0438\u0447\u0438\u043d<\/a> \u2014 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0432 \u0441\u0442\u0440\u043e\u0433\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0430 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 script-\u044b \u043d\u0435\u0442:<\/p>\n<ol>\n<li>\u0441\u043a\u0430\u0436\u0435\u043c, \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0444\u0430\u0439\u043b, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0432 \u043d\u0435\u0441\u0442\u0440\u043e\u0433\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435;<\/li>\n<li>\u043f\u043e\u0442\u043e\u043c \u043e\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u00ab\u0438\u043c\u043f\u043e\u0440\u0442\\\u044d\u043a\u0441\u043f\u043e\u0440\u0442\u00bb \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b;<\/li>\n<li>\u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u043d\u0430\u0447\u0430\u0442\u044c \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u0435\u0449\u0435 \u0440\u0430\u0437 \u0432 \u0441\u0442\u0440\u043e\u0433\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435.<\/li>\n<\/ol>\n<p>  \u0415\u0449\u0435 \u043e\u0434\u043d\u0430 \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u2014 \u0442\u043e\u0442 \u0436\u0435 \u0444\u0430\u0439\u043b \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c \u0431\u0435\u0437 \u0441\u0442\u0440\u043e\u0433\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430 \u0438 \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c \u0441 \u043d\u0438\u043c \u0436\u0435. \u0422\u043e\u0433\u0434\u0430 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043e\u043d \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c.<\/p>\n<p>  \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0444\u0430\u0439\u043b\u0430 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\/\u0434\u043e \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u043e\u0441\u0442\u0430\u0432\u0448\u0435\u0439\u0441\u044f \u0447\u0430\u0441\u0442\u0438 \u0444\u0430\u0439\u043b\u0430 html). \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/blogs.windows.com\/msedgedev\/2016\/05\/17\/es6-modules-and-beyond\/&amp;usg=ALkJrhitcYsRsiGcwOcpyLBMED3zX1VA9Q\">\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b<\/a>, <a href=\"https:\/\/blogs.windows.com\/msedgedev\/2016\/05\/17\/es6-modules-and-beyond\/&amp;usg=ALkJrhitcYsRsiGcwOcpyLBMED3zX1VA9Q\">\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0434\u0432\u0438\u0436\u043a\u0430\u043c\u0438 Microsoft Chakra JavaScript \u0434\u043b\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439 ES<\/a>.<\/p>\n<h2>Node.js \u0441\u043f\u043e\u0441\u043e\u0431 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u043a\u0430\u043a \u043c\u043e\u0434\u0443\u043b\u044c<\/h2>\n<p>  Node.js \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u0433 script type=\u00abmodule\u00bb \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442. \u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u0441\u0435 \u0435\u0449\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/github.com\/nodejs\/node\/wiki\/ES6-Module-Detection-in-Node\">\u0441\u043f\u043e\u0440, \u043a\u0430\u043a\u0438\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e<\/a>.<\/p>\n<p>  \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u044b \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e\u043c:<\/p>\n<ol>\n<li>\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u00abuse module\u00bb \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443; <\/li>\n<li>\u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0432 package.json.<\/li>\n<\/ol>\n<p>  \u0414\u0440\u0443\u0433\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0432\u0441\u0435 \u0435\u0449\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0438 (\u0441\u043f\u0430\u0441\u0438\u0431\u043e <a href=\"https:\/\/github.com\/bmeck\">@bmeck<\/a> \u0437\u0430 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443):  <\/p>\n<ol>\n<li>\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f ES \u043c\u043e\u0434\u0443\u043b\u0435\u043c;<\/li>\n<li>\u043d\u043e\u0432\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0434\u043b\u044f ES6 \u041c\u043e\u0434\u0443\u043b\u0438 .mjs, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u0430\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430, \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/li>\n<\/ol>\n<p>  \u041a\u0430\u0436\u0434\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0438 \u043f\u043b\u044e\u0441\u044b \u0438 \u043c\u0438\u043d\u0443\u0441\u044b, \u0438 \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0435\u0442 \u0447\u0435\u0442\u043a\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430, \u043a\u0430\u043a\u0438\u043c <a href=\"https:\/\/github.com\/nodejs\/node-eps\/blob\/master\/002-es6-modules.md\">\u043f\u0443\u0442\u0435\u043c Node.js \u0431\u0443\u0434\u0435\u0442 \u0438\u0434\u0442\u0438<\/a>.<\/p>\n<h2>\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f<\/h2>\n<p>  \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c <a href=\"https:\/\/plnkr.co\/edit\/be0bb3%3Fp%3Dpreview&amp;usg=ALkJrhiCFb4UZhxlLPIzPLeJji1aY2S3uw\">\u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0434\u0435\u043c\u043a\u0443<\/a> (\u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u0440\u0430\u043d\u0435\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u0438). \u0422\u0430\u043a \u0447\u0442\u043e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043c\u043e\u0434\u0443\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0434\u0440\u0443\u0433\u043e\u0439 \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 \u0438\u0437 \u043d\u0435\u0433\u043e. \u041f\u0435\u0440\u0432\u044b\u0439 \u0448\u0430\u0433 \u2014 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0444\u0430\u0439\u043b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f: <\/p>\n<pre><code class=\"javascript\">&lt;script type=&quot;module&quot;\/&gt;<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"javascript\">&lt;!--index.html--&gt; &lt;!DOCTYPE html&gt; &lt;html&gt;   &lt;head&gt;     &lt;script type=&quot;module&quot; src=&quot;main.js&quot;&gt;&lt;\/script&gt;   &lt;\/head&gt;   &lt;body&gt;   &lt;\/body&gt; &lt;\/html&gt;<\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0444\u0430\u0439\u043b \u043c\u043e\u0434\u0443\u043b\u044f:  <\/p>\n<pre><code class=\"javascript\">\/\/ main.js import utils from &quot;.\/utils.js&quot;;  utils.alert(`   JavaScript modules work in this browser:   https:\/\/blog.whatwg.org\/js-modules `); <\/code><\/pre>\n<p>  \u0418, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b:  <\/p>\n<pre><code class=\"javascript\">\/\/ utils.js export default {     alert: (msg)=&gt;{         alert(msg);     } }; <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u043c\u044b \u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 .js, \u043a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 import. \u042d\u0442\u043e \u0435\u0449\u0435 \u043e\u0434\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0431\u0430\u043d\u0434\u043b\u0435\u0440\u043e\u0432 \u2014 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 .js \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<p>  \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0443 \u043c\u043e\u0434\u0443\u043b\u044f (<a href=\"https:\/\/plnkr.co\/edit\/i4rZ8U?p=preview\">\u0434\u0435\u043c\u043e<\/a>):  <\/p>\n<pre><code class=\"javascript\">var x = 1;  alert(x === window.x);\/\/false alert(this === undefined);\/\/ true<\/code><\/pre>\n<p>  \u0412-\u0442\u0440\u0435\u0442\u044c\u0438\u0445, \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0432 \u0441\u0442\u0440\u043e\u0433\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0442\u0440\u043e\u0433\u0438\u0439 \u0440\u0435\u0436\u0438\u043c \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435. <a href=\"https:\/\/plnkr.co\/edit\/sulRpONj6EZM1Sph7FSd?p=preview\">\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0434\u0435\u043c\u043e<\/a> \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435 \u0432 \u043c\u043e\u0434\u0443\u043b\u0435:  <\/p>\n<pre><code class=\"javascript\">\/\/ module.js var x; delete x; \/\/ !!! syntax error  alert(`     THIS ALERT SHOULDN'T be executed,     the error is expected     as the module's scripts are in the strict mode by default `);  \/\/ classic.js var x; delete x; \/\/ !!! syntax error  alert(`     THIS ALERT SHOULD be executed,     as you can delete variables outside of the strict mode  `);<\/code><\/pre>\n<p>  \u0421\u0442\u0440\u043e\u0433\u0438\u0439 \u0440\u0435\u0436\u0438\u043c \u043d\u0435\u043b\u044c\u0437\u044f \u043e\u0431\u043e\u0439\u0442\u0438 \u0432 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u044f\u0445.<\/p>\n<p>  <b>\u0418\u0442\u043e\u0433\u043e:<\/b><\/p>\n<ul>\n<li><b>.js \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u043f\u0443\u0449\u0435\u043d\u043e;<\/b><\/li>\n<li><b>\u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439, this \u043d\u0438 \u043d\u0430 \u043a\u043e\u0433\u043e \u043d\u0435 \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f;<\/b><\/li>\n<li><b>\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0432 \u0441\u0442\u0440\u043e\u0433\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e (\u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u00abuse strict\u00bb).<\/b><\/li>\n<\/ul>\n<h2>\u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0432 \u0442\u0435\u0433 script<\/h2>\n<p>  \u041a\u0430\u043a \u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u0434, \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0442\u044c \u0438\u0445 \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u0430\u043c. \u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0434\u0435\u043c\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c main.js \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0442\u0435\u0433 script type=\u00abmodule\u00bb \u0447\u0442\u043e <a href=\"https:\/\/plnkr.co\/edit\/ghsd9Z?p=preview\">\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0442\u0430\u043a\u043e\u043c\u0443 \u0436\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e<\/a>:  <\/p>\n<pre><code class=\"javascript\">&lt;script type=&quot;module&quot;&gt;   import utils from &quot;.\/utils.js&quot;;    utils.alert(`     JavaScript modules work in this browser:     https:\/\/blog.whatwg.org\/js-modules   `); &lt;\/script&gt;<\/code><\/pre>\n<p>  <b>\u0418\u0442\u043e\u0433\u043e:<\/b><\/p>\n<ul>\n<li><b>script type=\u00abmodule\u00bb \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u0442\u0430\u043a \u0438 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0432 \u0442\u0435\u0433 script.<\/b><\/li>\n<\/ul>\n<h2>\u041a\u0430\u043a \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u0438<\/h2>\n<p>  \u041d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 (\u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435) \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u043c\u0435\u044e\u0442 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 deffered \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u044d\u0442\u043e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0435\u0433 script type=\u00abmodule\u00bb \u0441 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u043c defer \u0438 \u0431\u0435\u0437. \u0412\u043e\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438\u0437 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 <a href=\"https:\/\/html.spec.whatwg.org\/multipage\/scripting.html#attr-script-defer\">\u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/a>:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/1b7\/a3b\/cb7\/1b7a3bcb7dfd4b06b413104eb717eb93.png\"\/><\/p>\n<p>  \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0432 \u043c\u043e\u0434\u0443\u043b\u044f\u0445 \u043d\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0442, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442 \u043f\u0430\u0440\u0441\u0438\u043d\u0433 html. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 async, \u0442\u043e\u0433\u0434\u0430 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043d \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044f.<\/p>\n<p>  \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043e\u0442 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u0436\u0435, \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433 html. \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 <a href=\"https:\/\/plnkr.co\/edit\/EuzEJ6?p=preview\">\u0434\u0435\u043c\u043e \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u043c\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0432 \u0442\u0435\u0433\u0435 script<\/a>, \u0433\u0434\u0435 \u043f\u0435\u0440\u0432\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0435\u0437 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 defer \\ async:<\/p>\n<pre><code class=\"javascript\">&lt;!DOCTYPE html&gt; &lt;html&gt;   &lt;head&gt;     &lt;script type=&quot;module&quot; src=&quot;.\/script1.js&quot;&gt;&lt;\/script&gt;     &lt;script src=&quot;.\/script2.js&quot;&gt;&lt;\/script&gt;     &lt;script defer src=&quot;.\/script3.js&quot;&gt;&lt;\/script&gt;     &lt;script async src=&quot;.\/script4.js&quot;&gt;&lt;\/script&gt;     &lt;script type=&quot;module&quot; async src=&quot;.\/script5.js&quot;&gt;&lt;\/script&gt;   &lt;\/head&gt;   &lt;body&gt;   &lt;\/body&gt; &lt;\/html&gt;<\/code><\/pre>\n<p>  \u041f\u043e\u0440\u044f\u0434\u043e\u043a \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432, \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0438 \u0442. \u0434.<\/p>\n<p>  <b>\u0418\u0442\u043e\u0433\u043e:<\/b><\/p>\n<ul>\n<li><b>\u043c\u043e\u0434\u0443\u043b\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b \u0438 \u0432\u0435\u0434\u0443\u0442 \u0441\u0435\u0431\u044f \u043a\u0430\u043a deffered \u0441\u043a\u0440\u0438\u043f\u0442\u044b<\/b><\/li>\n<\/ul>\n<p>  \u041c\u044b \u0432\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u0432 \u044d\u043f\u043e\u0445\u0443 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0432 JavaScript. JS \u043f\u0440\u043e\u0448\u0435\u043b \u0434\u043e\u043b\u0433\u0438\u0439 \u043f\u0443\u0442\u044c \u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f, \u0438, \u043d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e, \u043e\u043d \u0434\u043e\u0431\u0440\u0430\u043b\u0441\u044f \u0434\u043e \u044d\u0442\u043e\u0439 \u0442\u043e\u0447\u043a\u0438. \u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u044d\u0442\u043e \u043e\u0434\u043d\u0430 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0434\u043e\u043b\u0433\u043e\u0436\u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0432\u043e\u0441\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0444\u0438\u0447. \u041d\u0438\u043a\u0430\u043a\u043e\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0430\u0445\u0430\u0440 \u0438 \u043d\u043e\u0432\u044b\u0435 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043d\u0435 \u0438\u0434\u0443\u0442 \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441 \u044d\u0442\u0438\u043c \u043d\u043e\u0432\u044b\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c.<\/p>\n<p>  \u0412\u0441\u0435 \u0432\u044b\u0448\u0435\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u0434\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u0430 \u0441 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u043c\u0438 ECMAScript \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438. \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d\u044b \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445, \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u0441 \u043e\u0431\u044b\u0447\u043d\u044b\u043c\u0438 \u0431\u0430\u043d\u0434\u043b\u0430\u043c\u0438 \u0438 \u0442. \u0434.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0435\u0439\u0447\u0430\u0441, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043f\u0440\u043e\u0439\u0442\u0438\u0441\u044c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c:  <\/p>\n<ul>\n<li><a href=\"http:\/\/exploringjs.com\/es6\/ch_modules.html\"> Modules part JavaScript books by Dr. Axel Rauschmayer<\/a>  <\/li>\n<li><a href=\"https:\/\/github.com\/whatwg\/html\/pull\/443\">The proposal of `script type=\u201dmodule\u201d ` by Domenic Denicola<\/a><\/li>\n<li><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/scripting.html#scripting-3\">HTML live standard, \u201cScripting\u201d section<\/a><\/li>\n<\/ul>\n<p>  \u0427\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u043a\u043e\u0433\u0434\u0430 \u044f \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437, \u0438 \u043e\u043d\u0438 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u044f \u043f\u043e\u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0442\u043e, \u0447\u0435\u0433\u043e \u043d\u0435 \u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0441 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0442\u0430\u043a\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u0444\u0438\u0447, \u043a\u0430\u043a const\/let\/arrow functions \u0438 \u043f\u0440\u043e\u0447\u0438\u0445 \u043d\u043e\u0432\u043e\u043c\u043e\u0434\u043d\u044b\u0445 \u0444\u0438\u0448\u0435\u043a, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u043d\u0430\u0447\u0430\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445. \u042f \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435, \u043a\u0430\u043a \u0438 \u044f, \u0440\u0430\u0434\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b.<\/p>\n<h2>\u0414\u0440\u0443\u0433\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0430\u0432\u0442\u043e\u0440\u0430 \u043f\u043e \u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0435<\/h2>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/blog.hospodarets.com\/native-ecmascript-modules-dynamic-import\">Native ECMAScript modules: dynamic import()<\/a><\/li>\n<li><a href=\"https:\/\/blog.hospodarets.com\/native-ecmascript-modules-nomodule\">Native ECMAScript modules: nomodule attribute for the migration<\/a><\/li>\n<li><a href=\"https:\/\/blog.hospodarets.com\/native-ecmascript-modules-new-features\">Native ECMAScript modules: the new features and differences from Webpack modules<\/a> <\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u041e\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430<\/h2>\n<p>  \u042f Frontend \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0410\u0432\u0438\u0430 \u0432 <a href=\"https:\/\/www.tutu.ru\">Tutu.ru<\/a>. \u0421\u0435\u0439\u0447\u0430\u0441 \u0443 \u043d\u0430\u0441 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Webpack \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0430\u043d\u0434\u043b\u0435\u0440\u0430. \u0415\u0441\u0442\u044c \u043b\u0435\u0433\u0430\u0441\u0438 \u043a\u043e\u0434 \u0438 \u0441\u0442\u0430\u0440\u044b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0441 RequireJS. \u041d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b \u0438 \u0436\u0434\u0435\u043c \u0438\u0445 \u0441 \u043d\u0435\u0442\u0435\u0440\u043f\u0435\u043d\u0438\u0435\u043c, \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u043c\u044b \u0443\u0436\u0435 \u043f\u0435\u0440\u0435\u0432\u0435\u043b\u0438 \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043d\u0430 HTTP\/2. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0441\u043e\u0432\u0441\u0435\u043c \u0431\u0435\u0437 \u0431\u0430\u043d\u0434\u043b\u0435\u0440\u043e\u0432 \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043c\u044b \u043d\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0432\u043e \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. \u041d\u043e \u043f\u0440\u0438\u0445\u043e\u0434 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043c\u043e\u0433 \u0431\u044b \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0432\u043e\u0440\u043a\u0444\u043b\u043e\u0443 \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u0434\u0435\u043f\u043b\u043e\u044f.<br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/326716\/\"> https:\/\/habrahabr.ru\/post\/326716\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><a href=\"https:\/\/habrahabr.ru\/company\/tuturu\/blog\/326716\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/be1\/220\/2ad\/be12202ad80598308949f8bfe6b8b728.png\" alt=\"\u0411\u0430\u043d\u0434\u043b\u0435\u0440\u044b \u0438 \u043a\u043e\u043c\u043f\u0430\u0439\u043b\u0435\u0440\u044b \u043f\u0440\u043e\u0442\u0438\u0432 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439\"\/><\/a><\/p>\n<p>  <i>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u043c \u0441\u0442\u0430\u0442\u044c\u0438 \u043e \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 <a href=\"http:\/\/www.ecma-international.org\/ecma-262\/6.0\/#sec-modules\">ECMAScript \u043c\u043e\u0434\u0443\u043b\u044f\u0445<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0441\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u044e\u0442\u0441\u044f \u0441\u0440\u0435\u0434\u0438 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0435\u0440\u043e\u0432. Javascript \u0440\u0430\u043d\u0435\u0435 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b \u043d\u0430\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438, \u0438 \u043d\u0430\u043c, \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0435\u0440\u0430\u043c, \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438. \u041d\u043e \u0432\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u0432 \u0441\u043a\u043e\u0440\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Webpack \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0430\u043d\u0434\u043b\u043e\u0432 \u043c\u043e\u0434\u0443\u043b\u0435\u0439. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u043c\u0438\u0440, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u0437\u0430 \u0432\u0430\u0441. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u0438\u0445 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u0430\u0445 \u044f \u0438 \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c.<\/i>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-285185","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/285185","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=285185"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/285185\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=285185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=285185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=285185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}