{"id":384487,"date":"2024-06-29T05:32:12","date_gmt":"2024-06-29T05:32:12","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=384487"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=384487","title":{"rendered":"<span>\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 Vue-CLI \u0438 Webpack \u043d\u0430 Vitejs<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/162\/b14\/94b\/162b1494b4437d172ee7e94b9ef2148e.png\" width=\"780\" height=\"439\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/162\/b14\/94b\/162b1494b4437d172ee7e94b9ef2148e.png\"\/><figcaption><\/figcaption><\/figure>\n<p><a href=\"https:\/\/qvault.io\/\"><u>\u0412\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Qvault, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u043c\u043e\u0438 \u043a\u0443\u0440\u0441\u044b \u043f\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e<\/u><\/a>, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u043d\u0430 Vue 2, \u0441 \u043f\u043b\u0430\u043d\u0430\u043c\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043d\u0430 Vue 3 \u0432 <em>\u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f<\/em>\u200b. \u0422\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u043d\u043e\u0432\u043e\u0435 \u043a\u043b\u0430\u0441\u0441\u043d\u043e\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"https:\/\/github.com\/vitejs\/vite\"><u>Vite<\/u><\/a>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0449\u0435\u0439, \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0448\u0438\u0445 \u043c\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<\/p>\n<ul>\n<li>\n<p>\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/p>\n<\/li>\n<li>\n<p>\u0413\u043e\u0440\u044f\u0447\u0430\u044f \u0437\u0430\u043c\u0435\u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 ES \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u043e \u043c\u0435\u043d\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0435\u0440 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u043e\u0435\u0433\u043e (\u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e) \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 10 \u0441\u0435\u043a\u0443\u043d\u0434 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441 <a href=\"https:\/\/cli.vuejs.org\/\"><u>Vue-cli<\/u><\/a> \u0438 <a href=\"https:\/\/webpack.js.org\/\"><u>Webpack<\/u><\/a>, \u0438 \u044f \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u043b \u043c\u043d\u043e\u0433\u043e \u0447\u0430\u0441\u043e\u0432 \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u043c, \u043f\u044b\u0442\u0430\u044f\u0441\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c Webpack \u0438 <a href=\"https:\/\/babeljs.io\/\"><u>Babel<\/u><\/a>, \u043a\u043e\u0433\u0434\u0430 \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u044b \u0431\u044b\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Vue. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u0445 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u044f \u0443\u0433\u043b\u0443\u0431\u043b\u044e\u0441\u044c \u0432 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u043d\u044f\u0442\u044c, \u0431\u0443\u0434\u0435\u0442 \u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u0430 \u043e\u0442 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u0434\u043b\u044f \u0432\u0430\u0441.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<\/td>\n<td>\n<p><strong>Vite<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Vue-cli + Webpack<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u0412\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Dev<\/p>\n<\/td>\n<td>\n<p>~600ms<\/p>\n<\/td>\n<td>\n<p>~10,000ms<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u0412\u0440\u0435\u043c\u044f HMR<\/p>\n<\/td>\n<td>\n<p>\u041d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d, \u043a\u0430\u0436\u0435\u0442\u0441\u044f <em>\u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e<\/em><\/p>\n<\/td>\n<td>\n<p>~2,000ms<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u0412\u0440\u0435\u043c\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0430<\/p>\n<\/td>\n<td>\n<p>~15s<\/p>\n<\/td>\n<td>\n<p>~22s<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0445 JS-\u0444\u0430\u0439\u043b\u043e\u0432<\/p>\n<\/td>\n<td>\n<p>29 JS modules<\/p>\n<\/td>\n<td>\n<p>18 JS Modules<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u0421\u0440\u0435\u0434\u043d\u0438\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0430\u043a\u0435\u0442\u0430 JS<\/p>\n<\/td>\n<td>\n<p>~29kb<\/p>\n<\/td>\n<td>\n<p>~61kb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u041e\u0431\u0449\u0438\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0430\u043a\u0435\u0442\u0430 JS<\/p>\n<\/td>\n<td>\n<p>~840kb<\/p>\n<\/td>\n<td>\n<p>~1098kb<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><em>Vite \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 Vue-cli + Webpack<\/em><\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c 18 \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0448\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Vue cli \u0438 webpack, \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u0432 \u0444\u0430\u0439\u043b routes.js. \u0418\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 Vue-cli \u0432\u044b\u0434\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442, \u0447\u0442\u043e \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0445\u0443\u0436\u0435 \u043f\u043e \u0441\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. Vite \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442 \u043f\u0430\u043a\u0435\u0442 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u043c \u043b\u0438\u043d\u0438\u044f\u043c \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u043d\u0430\u0434\u043e\u0435\u0434\u043b\u0438\u0432\u044b\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438.<\/p>\n<p><strong>\u0420\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438<\/strong><\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0448\u0430\u0433\u0438 \u043f\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 Vue 2 \u0438\u0437 Vue CLI \u0432 Vite.<\/p>\n<p><strong>\u0428\u0430\u0433 1 &#8212; \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438<\/strong><\/p>\n<p>\u0412\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 @vue-cli&#8230; \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0443\u0434\u0430\u043b\u0435\u043d\u044b. \u0414\u043b\u044f \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u043b\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445.<\/p>\n<pre><code class=\"javascript\">- \"@vue\/cli-plugin-babel\": \"^4.5.6\", - \"@vue\/cli-plugin-eslint\": \"^4.5.6\", - \"@vue\/cli-service\": \"^4.5.6\",<\/code><\/pre>\n<p>\u041e\u043d\u0438 \u0431\u044b\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u044b \u043d\u0430 Vite \u0438 \u0435\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f Vue.<\/p>\n<pre><code class=\"javascript\">+ \"vite\": \"^2.2.1\", + \"vite-plugin-vue2\": \"^1.4.4\", + \"@vue\/compiler-sfc\": \"^3.0.11\",<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435, Vite \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 sass \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043c\u043e\u0433\u0443 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0441\u0442\u0430\u0440\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<pre><code class=\"javascript\">- \"node-sass\": \"^4.12.0\", - \"sass-loader\": \"^10.0.2\",<\/code><\/pre>\n<p>\u0418 \u044f \u0437\u0430\u043c\u0435\u043d\u0438\u043b \u0438\u0445 \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 sass, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e Vite \u0442\u0440\u0435\u0431\u0443\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0431\u044b\u043b \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d.<\/p>\n<pre><code class=\"javascript\">+ \"sass\": \"^1.32.11\",<\/code><\/pre>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 Vite \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b (\u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0440\u044b\u0435, Vite \u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u043c \u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0442\u0438), \u044f \u0443\u0434\u0430\u043b\u0438\u043b \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 babel \u0438 \u043c\u043e\u0439 \u0444\u0430\u0439\u043b babel.config.js.<\/p>\n<pre><code class=\"javascript\">- \"babel-eslint\": \"^10.1.0\", - \"babel-runtime\": \"^6.26.0\"<\/code><\/pre>\n<p><strong>\u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 index.html<\/strong><\/p>\n<p>Vite \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u0442 index.html \u0432 \u043f\u0430\u043f\u043a\u0435 public, \u043a\u0430\u043a \u0432\u044b \u043f\u0440\u0438\u0432\u044b\u043a\u043b\u0438, \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043e\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u044f\u043c\u043e \u0432 \u043a\u043e\u0440\u043d\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u0435 \u0435\u0433\u043e \u0442\u0443\u0434\u0430. Vite \u0442\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430.<\/p>\n<pre><code class=\"javascript\">&lt;body>   &lt;noscript>     &lt;strong>       We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.     &lt;\/strong>   &lt;\/noscript>   &lt;div id=\"app\">&lt;\/div>    &lt;!-- this new script is for vite -->   &lt;script type=\"module\" src=\"\/src\/main.js\">&lt;\/script> &lt;\/body><\/code><\/pre>\n<p>\u0412\u0430\u043c \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u043a\u0442\u0438\u0432\u044b, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \/, \u0430 \u043d\u0435 &lt;%= BASE_URL %>.<\/p>\n<pre><code class=\"javascript\">&lt;link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"\/apple-touch-icon.png\"> &lt;link rel=\"icon\" type=\"image\/png\" sizes=\"32x32\" href=\"\/favicon-32x32.png\"> &lt;link rel=\"icon\" type=\"image\/png\" sizes=\"16x16\" href=\"\/favicon-16x16.png\"> &lt;link rel=\"manifest\" href=\"\/site.webmanifest\"><\/code><\/pre>\n<p><strong>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f Vite<\/strong><\/p>\n<p>\u0412\u043e\u0442 vite.config.js, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f, \u043e\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<pre><code class=\"javascript\">import { defineConfig } from 'vite'; import { createVuePlugin } from 'vite-plugin-vue2'; import path from 'path'; export default defineConfig({   plugins: [ createVuePlugin() ],   server: {     port: 8080   },   resolve: {     alias: [       {         find: '@',         replacement: path.resolve(__dirname, 'src')       }     ]   },   build: {     chunkSizeWarningLimit: 600,     cssCodeSplit: false   } });<\/code><\/pre>\n<p>\u0411\u043b\u043e\u043a resolve \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043c\u043d\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f @ \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043e\u0440\u043d\u044f \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 src. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, import Tooltip from &#8216;@\/components\/Tooltip.vue&#8217;;.<\/p>\n<p>\u0411\u043b\u043e\u043a build \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439, \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043e\u043d \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u044e\u0449\u0438\u0439 \u043b\u0438\u043c\u0438\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 \u0441 500 \u043a\u0431 \u0434\u043e 600 \u043a\u0431 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u042f \u0441\u0434\u0435\u043b\u0430\u043b \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u043e\u0447\u0435\u043d\u044c \u0442\u044f\u0436\u0435\u043b\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 \u043a\u043e\u0434\u0430, \u0438 \u044f \u043d\u0435 \u0445\u043e\u0447\u0443 \u0432\u0438\u0434\u0435\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437.<\/p>\n<p>\u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043c\u043e\u0439 \u0441\u0430\u0439\u0442 <strong>\u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043b\u043e\u043c\u0430\u043b\u0441\u044f<\/strong>, \u043a\u043e\u0433\u0434\u0430 \u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b Vite \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043c\u043e\u0438 .css \u0444\u0430\u0439\u043b\u044b \u0442\u0430\u043a, \u043a\u0430\u043a \u043e\u043d \u0445\u043e\u0442\u0435\u043b. \u042d\u0442\u043e \u043c\u0435\u043d\u044f \u043e\u0447\u0435\u043d\u044c \u0440\u0430\u0441\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044f \u0431\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0435\u043b, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 CSS, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c \u043d\u0443\u0436\u043d\u044b. \u0415\u0441\u043b\u0438 \u0443 \u043a\u043e\u0433\u043e-\u0442\u043e \u0431\u044b\u043b\u0430 \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0434\u0430\u0439\u0442\u0435 \u043c\u043d\u0435 \u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a \u0432\u044b \u0435\u0435 \u0440\u0435\u0448\u0438\u043b\u0438.<\/p>\n<p><strong>\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f .vue<\/strong><\/p>\n<p>Vite \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 .vue \u0438\u043c\u043f\u043e\u0440\u0442\u044b \u0432\u043a\u043b\u044e\u0447\u0430\u043b\u0438 .vue \u0432 \u043f\u0443\u0442\u044c. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u0442\u043e\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f. \u0412\u0441\u0435 \u0432\u0430\u0448\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0441 import Tooltip from &#8216;@\/components\/Tooltip&#8217; \u043d\u0430 import Tooltip from &#8216;@\/components\/Tooltip.vue&#8217;.<\/p>\n<p><strong>\u0420\u0430\u0437\u0431\u0438\u0432\u043a\u0430 Webpack \u0434\u043b\u044f \u043b\u0435\u043d\u0438\u0432\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u044b\u0445 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432<\/strong><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0440\u0430\u043d\u0435\u0435 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u0432 Webpack \u0434\u043b\u044f \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430, \u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u043b\u0430\u0442\u044c! \u041f\u0440\u043e\u0441\u0442\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u0435 \u0438\u0445.<\/p>\n<pre><code class=\"java\">const Courses = () => import(\/* webpackChunkName: \"Courses\" *\/ '@\/views\/Courses.vue');<\/code><\/pre>\n<p>\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f<\/p>\n<pre><code class=\"javascript\">const Courses = () => import('@\/views\/Courses.vue');<\/code><\/pre>\n<p><strong>\u0421\u043a\u0440\u0438\u043f\u0442\u044b Yarn<\/strong><\/p>\n<p>\u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0440\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u0430.<\/p>\n<pre><code class=\"javascript\">\"serve\": \"vite --open\", \"preview\": \"vite preview --open --port 8080\", \"build\": \"vite build --out-dir dist\", \"lint\": \"eslint src\", \"lint:fix\": \"eslint src --fix\"<\/code><\/pre>\n<ul>\n<li>\n<p>yarn serve \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 \u0431\u0440\u0430\u0443\u0437\u0435\u0440.<\/p>\n<\/li>\n<li>\n<p>yarn build \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d-\u0444\u0430\u0439\u043b\u044b \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0438\u0445 \u0432 dist<\/p>\n<\/li>\n<li>\n<p>yarn preview \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d-\u0444\u0430\u0439\u043b\u044b \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>yarn lint \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 eslint \u0438 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0445. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 vue-cli-service lint, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b eslint \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 Node<\/strong><\/p>\n<p>Vite \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043d \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u0434 Node.js \u043d\u0435 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u0441\u044f \u0432 \u0432\u0430\u0448 \u0444\u0440\u043e\u043d\u0442-\u0435\u043d\u0434 \u0431\u0430\u043d\u0434\u043b. \u042f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u0438\u043c\u0435\u043b, \u043d\u0443\u0436\u0434\u0430\u043b\u0430\u0441\u044c \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 global. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u043d\u043e \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u0440\u043e\u043a\u043b\u0430\u0434\u043a\u0443 (shim) \u0432 index.html.<\/p>\n<pre><code class=\"javascript\">&lt;!-- polyfill global because shit dependencies -->   &lt;script>     const global = globalThis;   &lt;\/script> &lt;!-- end polyfill --><\/code><\/pre>\n<p><strong>Vue 3<\/strong><\/p>\n<p>\u041c\u043e\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f, \u043f\u043e \u0432\u0441\u0435\u0439 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0431\u0443\u0434\u0435\u0442 \u043d\u0430 Vue 3, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u0433\u043e\u0434\u0443. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0436\u0434\u0430\u043b \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043d\u043e\u0432\u043e\u0439 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0438\u0437 \u043c\u043e\u0438\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439.<\/p>\n<hr\/>\n<blockquote>\n<p>\u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043a\u0443\u0440\u0441\u0430 <a href=\"https:\/\/otus.pw\/9KeY\/\">\u00abVue.js \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u00bb<\/a>. <\/p>\n<p>\u0412\u0441\u0435\u0445 \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0445 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0435\u043c \u043d\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0443\u0440\u043e\u043a <a href=\"https:\/\/otus.pw\/fSVs\/\">\u00ab\u041e\u0431\u0437\u043e\u0440 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 Vue3\u00bb.<\/a> \u041d\u0430 \u044d\u0442\u043e\u043c \u0437\u0430\u043d\u044f\u0442\u0438\u0438 \u043c\u044b:<br \/>&#8212; \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c, \u043a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u043a\u043e\u0434 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f createApp;<br \/>&#8212; \u043a\u0430\u043a \u043c\u0438\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c V2 \u043d\u0430 V3, Migration build;<br \/>&#8212; \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432;<br \/>&#8212; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 vuex \u0438\u043b\u0438 composition api hooks.   <\/p>\n<p>\u2192 <a href=\"https:\/\/otus.pw\/fSVs\/\"><strong>\u0420\u0415\u0413\u0418\u0421\u0422\u0420\u0410\u0426\u0418\u042f<\/strong><\/a><\/p>\n<\/blockquote>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><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:\/\/habr.com\/ru\/articles\/572622\/\"> https:\/\/habr.com\/ru\/articles\/572622\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p><a href=\"https:\/\/qvault.io\/\"><u>\u0412\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Qvault, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u043c\u043e\u0438 \u043a\u0443\u0440\u0441\u044b \u043f\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e<\/u><\/a>, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u043d\u0430 Vue 2, \u0441 \u043f\u043b\u0430\u043d\u0430\u043c\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043d\u0430 Vue 3 \u0432 <em>\u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f<\/em>\u200b. \u0422\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u043d\u043e\u0432\u043e\u0435 \u043a\u043b\u0430\u0441\u0441\u043d\u043e\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"https:\/\/github.com\/vitejs\/vite\"><u>Vite<\/u><\/a>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0449\u0435\u0439, \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0448\u0438\u0445 \u043c\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<\/p>\n<ul>\n<li>\n<p>\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/p>\n<\/li>\n<li>\n<p>\u0413\u043e\u0440\u044f\u0447\u0430\u044f \u0437\u0430\u043c\u0435\u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 ES \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u043e \u043c\u0435\u043d\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0435\u0440 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u043e\u0435\u0433\u043e (\u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e) \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 10 \u0441\u0435\u043a\u0443\u043d\u0434 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441 <a href=\"https:\/\/cli.vuejs.org\/\"><u>Vue-cli<\/u><\/a> \u0438 <a href=\"https:\/\/webpack.js.org\/\"><u>Webpack<\/u><\/a>, \u0438 \u044f \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u043b \u043c\u043d\u043e\u0433\u043e \u0447\u0430\u0441\u043e\u0432 \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u043c, \u043f\u044b\u0442\u0430\u044f\u0441\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c Webpack \u0438 <a href=\"https:\/\/babeljs.io\/\"><u>Babel<\/u><\/a>, \u043a\u043e\u0433\u0434\u0430 \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u044b \u0431\u044b\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Vue. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u0445 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u044f \u0443\u0433\u043b\u0443\u0431\u043b\u044e\u0441\u044c \u0432 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u043d\u044f\u0442\u044c, \u0431\u0443\u0434\u0435\u0442 \u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u0430 \u043e\u0442 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u0434\u043b\u044f \u0432\u0430\u0441.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<\/td>\n<td>\n<p><strong>Vite<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Vue-cli + Webpack<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u0412\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Dev<\/p>\n<\/td>\n<td>\n<p>~600ms<\/p>\n<\/td>\n<td>\n<p>~10,000ms<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u0412\u0440\u0435\u043c\u044f HMR<\/p>\n<\/td>\n<td>\n<p>\u041d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d, \u043a\u0430\u0436\u0435\u0442\u0441\u044f <em>\u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e<\/em><\/p>\n<\/td>\n<td>\n<p>~2,000ms<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u0412\u0440\u0435\u043c\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0430<\/p>\n<\/td>\n<td>\n<p>~15s<\/p>\n<\/td>\n<td>\n<p>~22s<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0445 JS-\u0444\u0430\u0439\u043b\u043e\u0432<\/p>\n<\/td>\n<td>\n<p>29 JS modules<\/p>\n<\/td>\n<td>\n<p>18 JS Modules<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u0421\u0440\u0435\u0434\u043d\u0438\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0430\u043a\u0435\u0442\u0430 JS<\/p>\n<\/td>\n<td>\n<p>~29kb<\/p>\n<\/td>\n<td>\n<p>~61kb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u041e\u0431\u0449\u0438\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0430\u043a\u0435\u0442\u0430 JS<\/p>\n<\/td>\n<td>\n<p>~840kb<\/p>\n<\/td>\n<td>\n<p>~1098kb<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><em>Vite \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 Vue-cli + Webpack<\/em><\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c 18 \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0448\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Vue cli \u0438 webpack, \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u0432 \u0444\u0430\u0439\u043b routes.js. \u0418\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 Vue-cli \u0432\u044b\u0434\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442, \u0447\u0442\u043e \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0445\u0443\u0436\u0435 \u043f\u043e \u0441\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. Vite \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442 \u043f\u0430\u043a\u0435\u0442 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u043c \u043b\u0438\u043d\u0438\u044f\u043c \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u043d\u0430\u0434\u043e\u0435\u0434\u043b\u0438\u0432\u044b\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438.<\/p>\n<p><strong>\u0420\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438<\/strong><\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0448\u0430\u0433\u0438 \u043f\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 Vue 2 \u0438\u0437 Vue CLI \u0432 Vite.<\/p>\n<p><strong>\u0428\u0430\u0433 1 &#8212; \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438<\/strong><\/p>\n<p>\u0412\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 @vue-cli&#8230; \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0443\u0434\u0430\u043b\u0435\u043d\u044b. \u0414\u043b\u044f \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u043b\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445.<\/p>\n<pre><code class=\"javascript\">- \"@vue\/cli-plugin-babel\": \"^4.5.6\", - \"@vue\/cli-plugin-eslint\": \"^4.5.6\", - \"@vue\/cli-service\": \"^4.5.6\",<\/code><\/pre>\n<p>\u041e\u043d\u0438 \u0431\u044b\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u044b \u043d\u0430 Vite \u0438 \u0435\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f Vue.<\/p>\n<pre><code class=\"javascript\">+ \"vite\": \"^2.2.1\", + \"vite-plugin-vue2\": \"^1.4.4\", + \"@vue\/compiler-sfc\": \"^3.0.11\",<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435, Vite \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 sass \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043c\u043e\u0433\u0443 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0441\u0442\u0430\u0440\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<pre><code class=\"javascript\">- \"node-sass\": \"^4.12.0\", - \"sass-loader\": \"^10.0.2\",<\/code><\/pre>\n<p>\u0418 \u044f \u0437\u0430\u043c\u0435\u043d\u0438\u043b \u0438\u0445 \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 sass, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e Vite \u0442\u0440\u0435\u0431\u0443\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0431\u044b\u043b \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d.<\/p>\n<pre><code class=\"javascript\">+ \"sass\": \"^1.32.11\",<\/code><\/pre>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 Vite \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b (\u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0440\u044b\u0435, Vite \u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u043c \u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0442\u0438), \u044f \u0443\u0434\u0430\u043b\u0438\u043b \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 babel \u0438 \u043c\u043e\u0439 \u0444\u0430\u0439\u043b babel.config.js.<\/p>\n<pre><code class=\"javascript\">- \"babel-eslint\": \"^10.1.0\", - \"babel-runtime\": \"^6.26.0\"<\/code><\/pre>\n<p><strong>\u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 index.html<\/strong><\/p>\n<p>Vite \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u0442 index.html \u0432 \u043f\u0430\u043f\u043a\u0435 public, \u043a\u0430\u043a \u0432\u044b \u043f\u0440\u0438\u0432\u044b\u043a\u043b\u0438, \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043e\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u044f\u043c\u043e \u0432 \u043a\u043e\u0440\u043d\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u0435 \u0435\u0433\u043e \u0442\u0443\u0434\u0430. Vite \u0442\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430.<\/p>\n<pre><code class=\"javascript\">&lt;body>   &lt;noscript>     &lt;strong>       We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.     &lt;\/strong>   &lt;\/noscript>   &lt;div id=\"app\">&lt;\/div>    &lt;!-- this new script is for vite -->   &lt;script type=\"module\" src=\"\/src\/main.js\">&lt;\/script> &lt;\/body><\/code><\/pre>\n<p>\u0412\u0430\u043c \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u043a\u0442\u0438\u0432\u044b, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \/, \u0430 \u043d\u0435 &lt;%= BASE_URL %>.<\/p>\n<pre><code class=\"javascript\">&lt;link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"\/apple-touch-icon.png\"> &lt;link rel=\"icon\" type=\"image\/png\" sizes=\"32x32\" href=\"\/favicon-32x32.png\"> &lt;link rel=\"icon\" type=\"image\/png\" sizes=\"16x16\" href=\"\/favicon-16x16.png\"> &lt;link rel=\"manifest\" href=\"\/site.webmanifest\"><\/code><\/pre>\n<p><strong>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f Vite<\/strong><\/p>\n<p>\u0412\u043e\u0442 vite.config.js, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f, \u043e\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<pre><code class=\"javascript\">import { defineConfig } from 'vite'; import { createVuePlugin } from 'vite-plugin-vue2'; import path from 'path'; export default defineConfig({   plugins: [ createVuePlugin() ],   server: {     port: 8080   },   resolve: {     alias: [       {         find: '@',         replacement: path.resolve(__dirname, 'src')       }     ]   },   build: {     chunkSizeWarningLimit: 600,     cssCodeSplit: false   } });<\/code><\/pre>\n<p>\u0411\u043b\u043e\u043a resolve \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043c\u043d\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f @ \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043e\u0440\u043d\u044f \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 src. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, import Tooltip from &#8216;@\/components\/Tooltip.vue&#8217;;.<\/p>\n<p>\u0411\u043b\u043e\u043a build \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439, \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043e\u043d \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u044e\u0449\u0438\u0439 \u043b\u0438\u043c\u0438\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 \u0441 500 \u043a\u0431 \u0434\u043e 600 \u043a\u0431 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u042f \u0441\u0434\u0435\u043b\u0430\u043b \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u043e\u0447\u0435\u043d\u044c \u0442\u044f\u0436\u0435\u043b\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 \u043a\u043e\u0434\u0430, \u0438 \u044f \u043d\u0435 \u0445\u043e\u0447\u0443 \u0432\u0438\u0434\u0435\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437.<\/p>\n<p>\u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043c\u043e\u0439 \u0441\u0430\u0439\u0442 <strong>\u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043b\u043e\u043c\u0430\u043b\u0441\u044f<\/strong>, \u043a\u043e\u0433\u0434\u0430 \u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b Vite \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043c\u043e\u0438 .css \u0444\u0430\u0439\u043b\u044b \u0442\u0430\u043a, \u043a\u0430\u043a \u043e\u043d \u0445\u043e\u0442\u0435\u043b. \u042d\u0442\u043e \u043c\u0435\u043d\u044f \u043e\u0447\u0435\u043d\u044c \u0440\u0430\u0441\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044f \u0431\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0435\u043b, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 CSS, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c \u043d\u0443\u0436\u043d\u044b. \u0415\u0441\u043b\u0438 \u0443 \u043a\u043e\u0433\u043e-\u0442\u043e \u0431\u044b\u043b\u0430 \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0434\u0430\u0439\u0442\u0435 \u043c\u043d\u0435 \u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a \u0432\u044b \u0435\u0435 \u0440\u0435\u0448\u0438\u043b\u0438.<\/p>\n<p><strong>\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f .vue<\/strong><\/p>\n<p>Vite \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 .vue \u0438\u043c\u043f\u043e\u0440\u0442\u044b \u0432\u043a\u043b\u044e\u0447\u0430\u043b\u0438 .vue \u0432 \u043f\u0443\u0442\u044c. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u0442\u043e\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f. \u0412\u0441\u0435 \u0432\u0430\u0448\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0441 import Tooltip from &#8216;@\/components\/Tooltip&#8217; \u043d\u0430 import Tooltip from &#8216;@\/components\/Tooltip.vue&#8217;.<\/p>\n<p><strong>\u0420\u0430\u0437\u0431\u0438\u0432\u043a\u0430 Webpack \u0434\u043b\u044f \u043b\u0435\u043d\u0438\u0432\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u044b\u0445 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432<\/strong><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0440\u0430\u043d\u0435\u0435 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u0432 Webpack \u0434\u043b\u044f \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430, \u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u043b\u0430\u0442\u044c! \u041f\u0440\u043e\u0441\u0442\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u0435 \u0438\u0445.<\/p>\n<pre><code class=\"java\">const Courses = () => import(\/* webpackChunkName: \"Courses\" *\/ '@\/views\/Courses.vue');<\/code><\/pre>\n<p>\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f<\/p>\n<pre><code class=\"javascript\">const Courses = () => import('@\/views\/Courses.vue');<\/code><\/pre>\n<p><strong>\u0421\u043a\u0440\u0438\u043f\u0442\u044b Yarn<\/strong><\/p>\n<p>\u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0440\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u0430.<\/p>\n<pre><code class=\"javascript\">\"serve\": \"vite --open\", \"preview\": \"vite preview --open --port 8080\", \"build\": \"vite build --out-dir dist\", \"lint\": \"eslint src\", \"lint:fix\": \"eslint src --fix\"<\/code><\/pre>\n<ul>\n<li>\n<p>yarn serve \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 \u0431\u0440\u0430\u0443\u0437\u0435\u0440.<\/p>\n<\/li>\n<li>\n<p>yarn build \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d-\u0444\u0430\u0439\u043b\u044b \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0438\u0445 \u0432 dist<\/p>\n<\/li>\n<li>\n<p>yarn preview \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d-\u0444\u0430\u0439\u043b\u044b \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>yarn lint \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 eslint \u0438 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0445. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 vue-cli-service lint, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b eslint \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 Node<\/strong><\/p>\n<p>Vite \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043d \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u0434 Node.js \u043d\u0435 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u0441\u044f \u0432 \u0432\u0430\u0448 \u0444\u0440\u043e\u043d\u0442-\u0435\u043d\u0434 \u0431\u0430\u043d\u0434\u043b. \u042f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u0438\u043c\u0435\u043b, \u043d\u0443\u0436\u0434\u0430\u043b\u0430\u0441\u044c \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 global. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u043d\u043e \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u0440\u043e\u043a\u043b\u0430\u0434\u043a\u0443 (shim) \u0432 index.html.<\/p>\n<pre><code class=\"javascript\">&lt;!-- polyfill global because shit dependencies -->   &lt;script>     const global = globalThis;   &lt;\/script> &lt;!-- end polyfill --><\/code><\/pre>\n<p><strong>Vue 3<\/strong><\/p>\n<p>\u041c\u043e\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f, \u043f\u043e \u0432\u0441\u0435\u0439 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0431\u0443\u0434\u0435\u0442 \u043d\u0430 Vue 3, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u0433\u043e\u0434\u0443. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0436\u0434\u0430\u043b \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043d\u043e\u0432\u043e\u0439 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0438\u0437 \u043c\u043e\u0438\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439.<\/p>\n<hr\/>\n<blockquote>\n<p>\u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043a\u0443\u0440\u0441\u0430 <a href=\"https:\/\/otus.pw\/9KeY\/\">\u00abVue.js \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u00bb<\/a>. <\/p>\n<p>\u0412\u0441\u0435\u0445 \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0445 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0435\u043c \u043d\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0443\u0440\u043e\u043a <a href=\"https:\/\/otus.pw\/fSVs\/\">\u00ab\u041e\u0431\u0437\u043e\u0440 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 Vue3\u00bb.<\/a> \u041d\u0430 \u044d\u0442\u043e\u043c \u0437\u0430\u043d\u044f\u0442\u0438\u0438 \u043c\u044b:<br \/>&#8212; \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c, \u043a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u043a\u043e\u0434 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f createApp;<br \/>&#8212; \u043a\u0430\u043a \u043c\u0438\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c V2 \u043d\u0430 V3, Migration build;<br \/>&#8212; \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432;<br \/>&#8212; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 vuex \u0438\u043b\u0438 composition api hooks.   <\/p>\n<p>\u2192 <a href=\"https:\/\/otus.pw\/fSVs\/\"><strong>\u0420\u0415\u0413\u0418\u0421\u0422\u0420\u0410\u0426\u0418\u042f<\/strong><\/a><\/p>\n<\/blockquote>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><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:\/\/habr.com\/ru\/articles\/572622\/\"> https:\/\/habr.com\/ru\/articles\/572622\/<\/a><br \/><\/br><\/br><\/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-384487","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/384487","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=384487"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/384487\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=384487"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=384487"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=384487"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}