{"id":382855,"date":"2024-06-29T04:32:37","date_gmt":"2024-06-29T04:32:37","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=382855"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=382855","title":{"rendered":"<span>\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 NextJS \u0431\u0435\u0437 create-next-app<\/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<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0437\u0430\u043c\u0435\u0442\u043a\u0435 \u044f \u0431\u044b \u0445\u043e\u0442\u0435\u043b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e  \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 NextJS 11<\/p>\n<p>\u0428\u0442\u0430\u0442\u043d\u044b\u043c \u0438 \u0441\u0430\u043c\u044b\u043c \u0431\u044b\u0441\u0442\u0440\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0448\u0442\u0430\u0442\u043d\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b <code>create-next-app<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441\u043e \u0432\u0441\u0435\u043c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0439 <abbr title=\"create-react-app\">CRA<\/abbr> \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u0437\u0430 \u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0435 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. <\/p>\n<p>\u042f \u0436\u0435 \u0445\u043e\u0447\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0443\u0442\u044c &#8212; \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0439, \u043d\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 (\u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0443\u0447\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b) \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c, \u0438\u0437 \u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0438 \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u043a\u0430\u043a \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 TypeScript \u0438 \u043b\u0438\u043d\u0442\u0435\u0440 ESLint.<\/p>\n<details class=\"spoiler\">\n<summary>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 NextJS<\/summary>\n<div class=\"spoiler__content\">\n<p>NextJS (<a href=\"https:\/\/nextjs.org\/\" rel=\"noopener noreferrer nofollow\">https:\/\/nextjs.org\/<\/a>) &#8212; \u044d\u0442\u043e javascript-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 (\u0442\u0430\u043a\u0438\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u044c html \u043a\u0430\u043a \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435, \u0442\u0430\u043a \u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439). \u0427\u0442\u043e \u043e\u043d \u0434\u0430\u0435\u0442?<\/p>\n<ul>\n<li>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e\u0439, \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0440\u043e\u0443\u0442\u0438\u043d\u0433 \u043f\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u0444\u0430\u0439\u043b\u0430\u0445<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 SSR &#8212; server-side rendering, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043a\u0430\u043d\u0430\u043b\u044b \u0441\u0432\u044f\u0437\u0438 \u0446\u0435\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440. \u041a\u043b\u0438\u0435\u043d\u0442\u044b \u043d\u0430 \u0441\u043b\u0430\u0431\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445 (\u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435, \u0438 \u0432 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 &#8212; \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445) \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u043d\u0430 \u0441\u043b\u0430\u0431\u044b\u0445 \u0438 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043a\u0430\u043d\u0430\u043b\u0430\u0445 \u0441\u0432\u044f\u0437\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0438\u0439 user experience \u0437\u0430 \u0441\u0447\u0435\u0442 \u0432 \u0440\u0430\u0437\u044b \u0431\u043e\u043b\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 SSG &#8212; static site generation, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u0441\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e: \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0441\u0430\u0439\u0442\u0430 \u0431\u0435\u0437 \u0442\u0430\u043d\u0446\u0435\u0432 \u0441 \u0431\u0443\u0431\u043d\u043e\u043c \u0432\u043e\u043a\u0440\u0443\u0433 nginx, \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0435\u0442\u044f\u043c\u0438 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 (CDN)<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0444\u0438\u0447\u0435\u0439 Webpack 5 (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0431\u043e\u0440\u0442\u043e\u0432\u043e\u0439 \u0441\u0431\u043e\u0440\u0449\u0438\u043a)<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u043e\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u044c, \u0442\u0430\u043a \u0438 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u0432\u0443\u044e (\u0437\u0430 \u0441\u0447\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f api-\u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u043e\u0432)<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 TypeScript &#171;\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438&#187;<\/p>\n<\/li>\n<li>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 (\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043a\u0430\u043a React-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432)<\/p>\n<\/li>\n<li>\n<p>CSS Modules, Sass\/SCSS (\u0447\u0435\u0440\u0435\u0437 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430)<\/p>\n<\/li>\n<li>\n<p>\u0438 \u043c\u043d\u043e\u0433\u043e \u0432\u0441\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e, \u043e \u0447\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435 \u0438 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b (\u0441 \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0442\u0435\u043a\u0441\u0442\u0443 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e\u0439 \u0440\u0430\u0437\u0431\u0438\u0432\u043a\u043e\u0439 \u0432 \u0432\u0438\u0434\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432) &#8212; \u0432 <a href=\"https:\/\/gitlab.com\/agratoth\/nextjs-app-from-scratch\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/a><\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c react \u0438 next<\/h2>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b NextJS \u0442\u0440\u0435\u0431\u0443\u0435\u0442 Node.js \u0432\u0435\u0440\u0441\u0438\u0438 12.0 \u0438 \u0432\u044b\u0448\u0435, \u043d\u043e \u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u043b\u0438\u0437 Node.js 14.17 \u043a\u0430\u043a \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 LTS.<\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0448\u0430\u0433\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438<\/p>\n<pre><code class=\"bash\">mkdir nextjs-app &amp;&amp; cd nextjs-app npm init -y npm i react react-dom next<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0444\u0430\u0439\u043b <code>package.json<\/code> \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"json\">{   \"name\": \"nextjs-app\",   \"version\": \"1.0.0\",   \"description\": \"\",   \"main\": \"index.js\",   \"scripts\": {     \"test\": \"echo \\\"Error: no test specified\\\" &amp;&amp; exit 1\"   },   \"keywords\": [],   \"author\": \"\",   \"license\": \"ISC\",   \"dependencies\": {     \"next\": \"^11.0.1\",     \"react\": \"^17.0.2\",     \"react-dom\": \"^17.0.2\"   } }<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 scripts \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0441\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 &#8212; \u0437\u0430\u043f\u0443\u0441\u043a\u0430 dev-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0441\u0431\u043e\u0440\u043a\u0438, \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043b\u0438\u043d\u0442\u0435\u0440\u0430 (\u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0442\u044e\u043d\u043d\u0438\u043d\u0433 \u043b\u0438\u043d\u0442\u0435\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435):<\/p>\n<pre><code class=\"json\">\"scripts\": {   \"dev\": \"next dev\",   \"build\": \"next build\",   \"start\": \"next start\",   \"lint\": \"next lint\" }<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0443 \u0432\u0430\u0441 (\u043a\u0430\u043a \u0438 \u0443 \u043c\u0435\u043d\u044f) \u043f\u043e\u0440\u0442 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e (3000) \u043f\u0435\u0440\u043c\u0430\u043d\u0435\u043d\u0442\u043d\u043e \u0447\u0435\u043c-\u0442\u043e \u0437\u0430\u043d\u044f\u0442, \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0435\u0433\u043e \u043a\u043b\u044e\u0447\u043e\u043c <code>-p<\/code>:<\/p>\n<pre><code class=\"json\">\"scripts\": {   \"dev\": \"next dev -p 9993\",   \"build\": \"next build\",   \"start\": \"next start\",   \"lint\": \"next lint\" }<\/code><\/pre>\n<p>\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u043f\u0440\u0435\u0434\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u0430, \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c typescript<\/p>\n<h2>TypeScript<\/h2>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c TypeScript \u0438 \u0442\u0438\u043f\u044b \u0434\u043b\u044f React \u0438 \u0435\u0433\u043e DOM<\/p>\n<pre><code class=\"bash\">npm i -D typescript @types\/react @types\/react-dom<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 &#8212; <code>tsconfig.json<\/code><\/p>\n<p>\u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e (\u0441\u0442\u043e\u0438\u0442 \u043b\u0438 \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c &#8212; \u0432\u043e\u043f\u0440\u043e\u0441 \u0432\u043a\u0443\u0441\u0430):<\/p>\n<pre><code class=\"json\">{   \"compilerOptions\": {     \"target\": \"es5\",     \"lib\": [       \"dom\",       \"dom.iterable\",       \"esnext\"     ],     \"allowJs\": false,     \"skipLibCheck\": true,     \"strict\": true,     \"strictPropertyInitialization\": false,     \"forceConsistentCasingInFileNames\": true,     \"noEmit\": true,     \"esModuleInterop\": true,     \"module\": \"esnext\",     \"moduleResolution\": \"node\",     \"resolveJsonModule\": true,     \"isolatedModules\": true,     \"jsx\": \"preserve\"   },   \"include\": [     \"**\/*.ts\",     \"**\/*.tsx\"   ],   \"exclude\": [     \"node_modules\"   ] }<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e \u043e\u043f\u0446\u0438\u0438 \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p><code>target<\/code> &#8212; \u0446\u0435\u043b\u0435\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f ECMAScript. \u0414\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0440\u044b\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e ES5 (\u043a\u0430\u043a \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435). <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#target\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><code>lib<\/code> &#8212; \u043d\u0430\u0431\u043e\u0440 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0442\u0438\u043f\u043e\u0432, \u043d\u0443\u0436\u043d\u044b\u0445 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b dom (\u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0442\u0438\u043f\u044b DOM \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430), dom.iterable (\u0438\u0442\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u044b DOM) \u0438 esnext (\u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 API ECMAScript). <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#lib\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><code>allowJs<\/code> &#8212; \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d \u043b\u0438 \u0438\u043c\u043f\u043e\u0440\u0442 JS-\u0444\u0430\u0439\u043b\u043e\u0432 \u0432 TS- \u0438 TSX-\u0444\u0430\u0439\u043b\u044b. <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#allowJs\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><code>skipLibCheck<\/code> &#8212; \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043b\u0438 \u043f\u043e\u043b\u043d\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 *.d.ts-\u0444\u0430\u0439\u043b\u043e\u0432 (\u0444\u0430\u0439\u043b\u043e\u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439). \u0415\u0441\u043b\u0438 <code>true<\/code>, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435. <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#skipLibCheck\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><code>strict<\/code> &#8212; \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043f\u0430\u0447\u043a\u0443 \u0440\u0435\u0436\u0438\u043c\u043e\u0432 \u0441\u0442\u0440\u043e\u0433\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041f\u043e\u0441\u043b\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0446\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b. <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#strict\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a> <\/p>\n<\/li>\n<li>\n<p><code>strictPropertyInitialization<\/code> &#8212; \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e, \u043d\u043e \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430. <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#strictPropertyInitialization\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><code>forceConsistentCasingInFileNames<\/code> &#8212; \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0444\u043e\u0440\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443 \u0438\u043c\u0435\u043d\u0438 \u0444\u0430\u0439\u043b\u0430. \u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e, \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445. <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#forceConsistentCasingInFileNames\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a> <\/p>\n<\/li>\n<li>\n<p><code>noEmit<\/code> &#8212; \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u0444\u0430\u0439\u043b\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u0423 \u043d\u0430\u0441 \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u043e\u0439 \u0440\u0443\u043b\u0438\u0442 NextJS \u0438 Webpack, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u044b. <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#noEmit\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><code>esModuleInterop<\/code> &#8212; \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u043f\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043c ES6. <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#esModuleInterop\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><code>module<\/code> &#8212; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430. <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#module\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><code>moduleResolution<\/code> &#8212; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u0432. <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#moduleResolution\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><code>resolveJsonModule<\/code> &#8212; \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d \u043b\u0438 \u0438\u043c\u043f\u043e\u0440\u0442 JSON-\u0444\u0430\u0439\u043b\u043e\u0432. <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#resolveJsonModule\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><code>isolatedModules<\/code> &#8212; \u043d\u0443\u0436\u043d\u043e \u043b\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0444\u0430\u0439\u043b \u043a\u0430\u043a \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c. \u0415\u0441\u043b\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u0432 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 (\u0438\u043b\u0438 \u043f\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0435\u0449\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u0430 \u043a\u043b\u0430\u0441\u0441\/\u0442\u0438\u043f\/ \u0438\u0442.\u0434.) &#8212; \u043f\u0440\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430. <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#isolatedModules\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><code>jsx<\/code> &#8212; \u043a\u0430\u043a\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440, \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442 JSX-\u043a\u043e\u0434. \u041e\u043d, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u0435\u0442 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0437\u0430\u043c\u0435\u043d\u044f\u0442\u044c JSX \u043d\u0430 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0432\u0438\u0434\u0430 React.createElement \u0438\u043b\u0438, \u043a\u0430\u043a \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 &#8212; \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c JSX-\u043a\u043e\u0434 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#jsx\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><code>include<\/code> &#8212; \u043a\u0430\u043a\u0438\u0435 \u0444\u0430\u0439\u043b\u044b \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438<\/p>\n<\/li>\n<li>\n<p><code>exclude<\/code> &#8212; \u0430 \u043a\u0430\u043a\u0438\u0435 &#8212; \u043d\u0435 \u0431\u0443\u0434\u0443\u0442<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<h2>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f NextJS, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a<\/h2>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0434\u043e\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u0440\u043e\u0443\u0442\u0443 \u0438 \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0443<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 &#8212; <code>next-env.d.ts<\/code>, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0440\u0435\u0444\u0435\u0440\u0435\u043d\u0441\u044b \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u043e\u0432 NextJS<\/p>\n<pre><code class=\"javascript\">\/\/\/ &lt;reference types=\"next\" \/> \/\/\/ &lt;reference types=\"next\/types\/global\" \/> \/\/\/ &lt;reference types=\"next\/image-types\/global\" \/><\/code><\/pre>\n<p>\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b &#8212; <code>next.config.js<\/code><\/p>\n<pre><code class=\"javascript\">module.exports = {   reactStrictMode: true, }<\/code><\/pre>\n<p>\u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c, \u0447\u0442\u043e React \u0434\u043e\u043b\u0436\u0435\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u0442\u0440\u043e\u0433\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 (\u0432 \u044d\u0442\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u043b\u044e\u0431\u044b\u0435 \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0435 \u0438 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f React \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0432\u0440\u043e\u0434\u0435 \u0441\u0430\u0439\u0434-\u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u0431\u0443\u0434\u0443\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438)<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043e\u0441\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u043b\u044f NextJS \u0435\u0433\u043e \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043e\u043d \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>pages\/<\/code> \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0414\u0430\u043d\u043d\u0430\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0440\u043e\u0443\u0442\u0435\u0440\u0430: \u043a\u0430\u0436\u0434\u044b\u0439 \u0444\u0430\u0439\u043b \u0432 \u043d\u0435\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0440\u043e\u0443\u0442\u0430 (\u0444\u0430\u0439\u043b index.tsx, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u043c \u0438 \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0440\u043e\u0443\u0442\u0435 <code>\/<\/code>). <\/p>\n<p>\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f pages \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 &#8212; \u044d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u0443\u0441\u0442. \u041f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043a \u043d\u0435\u0439 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0441\u044f \u043a\u0443\u0447\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 &#8212; components, utils, helpers \u0438 \u043f\u0440\u043e\u0447\u0435\u0433\u043e. \u0418\u0445 \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u044f\u0442\u0430\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 pages &#8212; \u0442\u0430\u043c NextJS \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438, \u0438 \u043b\u044e\u0431\u043e\u0439 \u0444\u0430\u0439\u043b\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a, \u0440\u043e\u0436\u0434\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 NextJS \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c (\u043d\u043e \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 create-next-app, \u0447\u0442\u043e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u043e, \u0441\u0430\u043c \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442) \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <code>src<\/code> \u0438 \u0432 \u043d\u0435\u0435 \u0443\u0436\u0435 \u0441\u043f\u0440\u044f\u0442\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\">mkdir -p src\/pages<\/code><\/pre>\n<p>\u0412 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 pages \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b <code>_app.tsx<\/code> (\u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f). \u0412 \u043d\u0435\u043c \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 NextJS &#8212; <code>Head<\/code>, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c title \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/p>\n<pre><code class=\"javascript\">import { AppProps } from 'next\/dist\/next-server\/lib\/router\/router'; import React from 'react'; import Head from 'next\/head';  const MyApp = ({ Component, pageProps }: AppProps): JSX.Element => {   return (     &lt;>       &lt;Head>         &lt;title>NextJS App From Scratch&lt;\/title>       &lt;\/Head>       &lt;Component {...pageProps} \/>     &lt;\/>   ); };  export default MyApp;<\/code><\/pre>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c &#8212; \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c <code>index.tsx<\/code> \u0441 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/p>\n<pre><code class=\"javascript\">const Home = (): JSX.Element => {   return (     &lt;div>       Hello, NextJS!     &lt;\/div>   ); };  export default Home;<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <\/p>\n<pre><code class=\"bash\">npm run dev<\/code><\/pre>\n<p>\u0438 \u0440\u0430\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f &#171;<strong>Hello, NextJS<\/strong>!&#187; \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435<\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u043b\u0438\u043d\u0442\u0435\u0440\u0430<\/h2>\n<p>\u041b\u0438\u043d\u0442\u0438\u043d\u0433 &#8212; \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e. \u041b\u0438\u043d\u0442\u0438\u043d\u0433 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u044b, \u0442\u0438\u043f\u044b \u0438 \u0442\u043e\u0447\u043a\u0438 \u0441 \u0437\u0430\u043f\u044f\u0442\u043e\u0439. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u043b\u0438\u043d\u0442\u0438\u043d\u0433.<\/p>\n<p>\u041f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c NextJS \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043b\u0438\u043d\u0442\u0435\u0440\u0430, \u043a\u0430\u043a \u044d\u0442\u043e \u043d\u0438 \u0441\u0442\u0440\u0430\u043d\u043d\u043e, ESLint. \u0414\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b ESlint \u0441 typescript-\u043a\u043e\u0434\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 <code>.eslintrc<\/code><\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 &#8212; \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0438 \u043f\u0430\u0440\u0441\u0435\u0440\u043e\u0432<\/p>\n<pre><code class=\"bash\">npm i -D eslint eslint-config-next npm i -D @typescript-eslint\/eslint-plugin @typescript-eslint\/parser<\/code><\/pre>\n<p>\u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e<\/p>\n<pre><code class=\"javascript\">{ \"root\": true, \"parser\": \"@typescript-eslint\/parser\", \"plugins\": [ \"@typescript-eslint\" ], \"rules\": { \"semi\": \"off\", \"@typescript-eslint\/semi\": [ \"error\" ], \"@typescript-eslint\/no-empty-interface\": [ \"error\", { \"allowSingleExtends\": true } ] }, \"extends\": [ \"next\", \"next\/core-web-vitals\", \"eslint:recommended\", \"plugin:@next\/next\/recommended\", \"plugin:@typescript-eslint\/eslint-recommended\", \"plugin:@typescript-eslint\/recommended\" ] }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0441\u0435\u0440\u0430 typescript-eslint\/parser, \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u0445 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0442\u043e\u0447\u0435\u043a \u0441 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u043c \u0441\u0432\u043e\u044e (\u043c\u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043b\u0438\u043d\u0442\u0435\u0440 \u0440\u0443\u0433\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0442\u043e\u0447\u043a\u0438 \u0441 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e error, \u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c typescript-eslint\/semi \u043d\u0430 warn, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440). \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 extends \u043c\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 \u043a\u0430\u043a \u0438\u0437 NextJS, \u0442\u0430\u043a \u0438 \u0438\u0437 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 &#8212; \u0442\u0430\u043a \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u041d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 IDE (\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 VSCode, \u043a\u0430\u043a \u0443 \u043c\u0435\u043d\u044f) \u0443\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043b\u0438\u043d\u0442\u0438\u043d\u0433\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e.<\/p>\n<p>\u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043b\u0438\u043d\u0442\u0435\u0440\u043e\u043c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0435\u0440\u0435\u0434 \u0441\u0431\u043e\u0440\u043a\u043e\u0439) \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u043f\u0443\u0442\u0438: \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0448\u0442\u0430\u0442\u043d\u043e\u0439 \u043e\u0431\u0435\u0440\u0442\u043a\u043e\u0439 <code>next lint<\/code> (\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u043a eslint \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043f\u0440\u0435\u0434\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0432 \u0433\u043b\u0443\u0431\u0438\u043d\u0430\u0445 NextJS \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438), \u043b\u0438\u0431\u043e &#8212; \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c eslint \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u0443\u043a\u0430\u0437\u0430\u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434. \u042f \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u044e \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 (\u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043f\u0440\u0438\u0447\u0438\u043d \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e next lint \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>pages\/<\/code>, <code>components\/<\/code> \u0438 <code>lib\/<\/code> \u043f\u0440\u043e\u0435\u043a\u0442, \u0430 \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a \u043d\u0438\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, utils\/, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0434\u043b\u0438\u043d\u043d\u0443\u044e \u043f\u043e\u0440\u0442\u044f\u043d\u043a\u0443 \u043a\u043b\u044e\u0447\u0435\u0439 <code>next lint -d pages -d utils<\/code> &#8230;.)<\/p>\n<p>\u041f\u043e\u0441\u0435\u043c\u0443, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u043b\u0438\u043d\u0442\u0438\u043d\u0433\u0430 \u0432 \u0444\u0430\u0439\u043b\u0435 package.json \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439:<\/p>\n<pre><code class=\"json\">\"scripts\": {   \"dev\": \"next dev -p 9993\",   \"build\": \"next build\",   \"start\": \"next start\",   \"lint\": \"eslint src\/**\/*.{ts,tsx}\" },<\/code><\/pre>\n<p>\u042d\u0442\u0438\u043c \u043c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043c, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u043c \u043d\u0430\u0442\u0440\u0430\u0432\u0438\u0442\u044c eslint \u043d\u0430 \u0432\u0441\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 <code>src\/<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043b\u0435\u0436\u0430\u0442 \u0444\u0430\u0439\u043b\u044b ts \u0438 tsx.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a npm run lint \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0430\u043c \u0432\u0441\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u043e \u0432\u0441\u0435\u0445 typescript-\u0444\u0430\u0439\u043b\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/p>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f SVG<\/h2>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e NextJS \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438, \u043a\u0430\u043a \u0441 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438. \u0427\u0442\u043e, \u043d\u0430\u0434\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u0442\u044c, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u043e. \u041e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u043b\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 SVG, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u044e\u043d\u043d\u0438\u043d\u0433 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u0437\u0430\u0433\u043e\u0434\u044f.<\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f Webpack \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u043e\u0440\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 SVG \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0430\u043a\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 \u0432 dev-\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n<pre><code class=\"bash\">npm i -D @svgr\/webpack<\/code><\/pre>\n<p>\u0438 \u0437\u0430\u0442\u0435\u043c &#8212; \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c webpack-\u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0430 (<code>next.config.js<\/code>)<\/p>\n<pre><code class=\"javascript\">module.exports = {   reactStrictMode: true,   webpack(config, options) {     config.module.rules.push({       test: \/\\.svg$\/i,       issuer: { and: [\/\\.(ts)x?$\/] },       use: [         {           loader: \"@svgr\/webpack\",           options: {             svgoConfig: { plugins: [{ removeViewBox: false }] },           },         },       ],     });      return config;   } }<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0431\u044b \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 JS \u0432\u043c\u0435\u0441\u0442\u043e TypeScript, \u043d\u0430 \u044d\u0442\u043e\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 SVG \u0431\u044b \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0430\u0441\u044c. \u041d\u043e \u043d\u0435\u0442, \u0437\u0430 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044e \u043d\u0430\u0434\u043e \u043f\u043b\u0430\u0442\u0438\u0442\u044c.<\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u043b \u043a \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443 SVG-\u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 \u0442\u0438\u043f\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 &#8212; next-env.d.ts. \u0418 \u0432 NextJS 10 \u043c\u044b \u0431\u044b \u0442\u0430\u043a \u0438 \u0441\u0434\u0435\u043b\u0430\u043b\u0438. \u041d\u043e \u0432 11 \u0432\u0435\u0440\u0441\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441\u0442\u0430\u043b \u0430\u0432\u0442\u043e\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u0438 \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043f\u0435\u0440\u0435\u0442\u0438\u0440\u0430\u0435\u0442 \u0435\u0433\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435, \u0447\u0442\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u0442 \u0434\u0435\u043b\u043e. \u041d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <code>@types<\/code>, \u0430 \u0432 \u043d\u0435\u0439 &#8212; \u0444\u0430\u0439\u043b <code>images.d.ts<\/code> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f:<\/p>\n<pre><code class=\"javascript\">declare module \"*.svg\" {   const component: React.FC&lt;React.SVGProps&lt;SVGAElement>>;      export default component; }<\/code><\/pre>\n<p>\u042d\u0442\u0438\u043c \u043c\u044b \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443, \u0447\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u0438 \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c <code>*.svg<\/code> &#8212; \u044d\u0442\u043e \u043d\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0442\u0438\u043f\u0430 <code>any<\/code> (\u043a\u0430\u043a \u0432 \u0442\u0438\u043f\u0430\u0445 \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e), \u0430 \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u0435\u0431\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 React-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u043e\u0434\u0442\u044f\u043d\u0435\u0442 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432-\u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0442\u0438\u043f<\/p>\n<h2>\u0418\u0442\u043e\u0433\u0438<\/h2>\n<p>\u0421\u043b\u0435\u0434\u0443\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0437\u0430\u043c\u0435\u0442\u043a\u0435, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e (\u043d\u0443, \u0432\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0437 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0438 \u043f\u0440\u0430\u0432\u0434\u0430 \u0431\u044b\u0441\u0442\u0440\u043e!) \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 NextJS-\u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c TypeScript, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 SVG \u0438 \u043b\u0438\u043d\u0442\u0438\u043d\u0433\u043e\u043c.<\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<\/p>\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\/572230\/\"> https:\/\/habr.com\/ru\/articles\/572230\/<\/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<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0437\u0430\u043c\u0435\u0442\u043a\u0435 \u044f \u0431\u044b \u0445\u043e\u0442\u0435\u043b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e  \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 NextJS 11<\/p>\n<p>\u0428\u0442\u0430\u0442\u043d\u044b\u043c \u0438 \u0441\u0430\u043c\u044b\u043c \u0431\u044b\u0441\u0442\u0440\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0448\u0442\u0430\u0442\u043d\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b <code>create-next-app<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441\u043e \u0432\u0441\u0435\u043c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0439 <abbr title=\"create-react-app\">CRA<\/abbr> \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u0437\u0430 \u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0435 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. <\/p>\n<p>\u042f \u0436\u0435 \u0445\u043e\u0447\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0443\u0442\u044c &#8212; \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0439, \u043d\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 (\u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0443\u0447\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b) \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c, \u0438\u0437 \u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0438 \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u043a\u0430\u043a \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 TypeScript \u0438 \u043b\u0438\u043d\u0442\u0435\u0440 ESLint.<\/p>\n<details class=\"spoiler\">\n<summary>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 NextJS<\/summary>\n<div class=\"spoiler__content\">\n<p>NextJS (<a href=\"https:\/\/nextjs.org\/\" rel=\"noopener noreferrer nofollow\">https:\/\/nextjs.org\/<\/a>) &#8212; \u044d\u0442\u043e javascript-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 (\u0442\u0430\u043a\u0438\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u044c html \u043a\u0430\u043a \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435, \u0442\u0430\u043a \u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439). \u0427\u0442\u043e \u043e\u043d \u0434\u0430\u0435\u0442?<\/p>\n<ul>\n<li>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e\u0439, \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0440\u043e\u0443\u0442\u0438\u043d\u0433 \u043f\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u0444\u0430\u0439\u043b\u0430\u0445<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 SSR &#8212; server-side rendering, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043a\u0430\u043d\u0430\u043b\u044b \u0441\u0432\u044f\u0437\u0438 \u0446\u0435\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440. \u041a\u043b\u0438\u0435\u043d\u0442\u044b \u043d\u0430 \u0441\u043b\u0430\u0431\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445 (\u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435, \u0438 \u0432 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 &#8212; \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445) \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u043d\u0430 \u0441\u043b\u0430\u0431\u044b\u0445 \u0438 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043a\u0430\u043d\u0430\u043b\u0430\u0445 \u0441\u0432\u044f\u0437\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0438\u0439 user experience \u0437\u0430 \u0441\u0447\u0435\u0442 \u0432 \u0440\u0430\u0437\u044b \u0431\u043e\u043b\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 SSG &#8212; static site generation, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u0441\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e: \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0441\u0430\u0439\u0442\u0430 \u0431\u0435\u0437 \u0442\u0430\u043d\u0446\u0435\u0432 \u0441 \u0431\u0443\u0431\u043d\u043e\u043c \u0432\u043e\u043a\u0440\u0443\u0433 nginx, \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0435\u0442\u044f\u043c\u0438 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 (CDN)<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0444\u0438\u0447\u0435\u0439 Webpack 5 (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0431\u043e\u0440\u0442\u043e\u0432\u043e\u0439 \u0441\u0431\u043e\u0440\u0449\u0438\u043a)<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u043e\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u044c, \u0442\u0430\u043a \u0438 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u0432\u0443\u044e (\u0437\u0430 \u0441\u0447\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f api-\u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u043e\u0432)<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 TypeScript &#171;\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438&#187;<\/p>\n<\/li>\n<li>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 (\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043a\u0430\u043a React-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432)<\/p>\n<\/li>\n<li>\n<p>CSS Modules, Sass\/SCSS (\u0447\u0435\u0440\u0435\u0437 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430)<\/p>\n<\/li>\n<li>\n<p>\u0438 \u043c\u043d\u043e\u0433\u043e \u0432\u0441\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e, \u043e \u0447\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435 \u0438 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b (\u0441 \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0442\u0435\u043a\u0441\u0442\u0443 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e\u0439 \u0440\u0430\u0437\u0431\u0438\u0432\u043a\u043e\u0439 \u0432 \u0432\u0438\u0434\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432) &#8212; \u0432 <a href=\"https:\/\/gitlab.com\/agratoth\/nextjs-app-from-scratch\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/a><\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c react \u0438 next<\/h2>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b NextJS \u0442\u0440\u0435\u0431\u0443\u0435\u0442 Node.js \u0432\u0435\u0440\u0441\u0438\u0438 12.0 \u0438 \u0432\u044b\u0448\u0435, \u043d\u043e \u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u043b\u0438\u0437 Node.js 14.17 \u043a\u0430\u043a \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 LTS.<\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0448\u0430\u0433\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438<\/p>\n<pre><code class=\"bash\">mkdir nextjs-app &amp;&amp; cd nextjs-app npm init -y npm i react react-dom next<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0444\u0430\u0439\u043b <code>package.json<\/code> \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"json\">{   \"name\": \"nextjs-app\",   \"version\": \"1.0.0\",   \"description\": \"\",   \"main\": \"index.js\",   \"scripts\": {     \"test\": \"echo \\\"Error: no test specified\\\" &amp;&amp; exit 1\"   },   \"keywords\": [],   \"author\": \"\",   \"license\": \"ISC\",   \"dependencies\": {     \"next\": \"^11.0.1\",     \"react\": \"^17.0.2\",     \"react-dom\": \"^17.0.2\"   } }<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 scripts \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0441\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 &#8212; \u0437\u0430\u043f\u0443\u0441\u043a\u0430 dev-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0441\u0431\u043e\u0440\u043a\u0438, \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043b\u0438\u043d\u0442\u0435\u0440\u0430 (\u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0442\u044e\u043d\u043d\u0438\u043d\u0433 \u043b\u0438\u043d\u0442\u0435\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435):<\/p>\n<pre><code class=\"json\">\"scripts\": {   \"dev\": \"next dev\",   \"build\": \"next build\",   \"start\": \"next start\",   \"lint\": \"next lint\" }<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0443 \u0432\u0430\u0441 (\u043a\u0430\u043a \u0438 \u0443 \u043c\u0435\u043d\u044f) \u043f\u043e\u0440\u0442 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e (3000) \u043f\u0435\u0440\u043c\u0430\u043d\u0435\u043d\u0442\u043d\u043e \u0447\u0435\u043c-\u0442\u043e \u0437\u0430\u043d\u044f\u0442, \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0435\u0433\u043e \u043a\u043b\u044e\u0447\u043e\u043c <code>-p<\/code>:<\/p>\n<pre><code class=\"json\">\"scripts\": {   \"dev\": \"next dev -p 9993\",   \"build\": \"next build\",   \"start\": \"next start\",   \"lint\": \"next lint\" }<\/code><\/pre>\n<p>\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u043f\u0440\u0435\u0434\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u0430, \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c typescript<\/p>\n<h2>TypeScript<\/h2>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c TypeScript \u0438 \u0442\u0438\u043f\u044b \u0434\u043b\u044f React \u0438 \u0435\u0433\u043e DOM<\/p>\n<pre><code class=\"bash\">npm i -D typescript @types\/react @types\/react-dom<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 &#8212; <code>tsconfig.json<\/code><\/p>\n<p>\u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e (\u0441\u0442\u043e\u0438\u0442 \u043b\u0438 \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c &#8212; \u0432\u043e\u043f\u0440\u043e\u0441 \u0432\u043a\u0443\u0441\u0430):<\/p>\n<pre><code class=\"json\">{   \"compilerOptions\": {     \"target\": \"es5\",     \"lib\": [       \"dom\",       \"dom.iterable\",       \"esnext\"     ],     \"allowJs\": false,     \"skipLibCheck\": true,     \"strict\": true,     \"strictPropertyInitialization\": false,     \"forceConsistentCasingInFileNames\": true,     \"noEmit\": true,     \"esModuleInterop\": true,     \"module\": \"esnext\",     \"moduleResolution\": \"node\",     \"resolveJsonModule\": true,     \"isolatedModules\": true,     \"jsx\": \"preserve\"   },   \"include\": [     \"**\/*.ts\",     \"**\/*.tsx\"   ],   \"exclude\": [     \"node_modules\"   ] }<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e \u043e\u043f\u0446\u0438\u0438 \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p><code>target<\/code> &#8212; \u0446\u0435\u043b\u0435\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f ECMAScript. \u0414\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0440\u044b\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e ES5 (\u043a\u0430\u043a \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435). <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#target\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><code>lib<\/code> &#8212; \u043d\u0430\u0431\u043e\u0440 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0442\u0438\u043f\u043e\u0432, \u043d\u0443\u0436\u043d\u044b\u0445 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b dom (\u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0442\u0438\u043f\u044b DOM \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430), dom.iterable (\u0438\u0442\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u044b DOM) \u0438 esnext (\u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 API ECMAScript). <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#lib\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><code>allowJs<\/code> &#8212; \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d \u043b\u0438 \u0438\u043c\u043f\u043e\u0440\u0442 JS-\u0444\u0430\u0439\u043b\u043e\u0432 \u0432 TS- \u0438 TSX-\u0444\u0430\u0439\u043b\u044b. <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#allowJs\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><code>skipLibCheck<\/code> &#8212; \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043b\u0438 \u043f\u043e\u043b\u043d\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 *.d.ts-\u0444\u0430\u0439\u043b\u043e\u0432 (\u0444\u0430\u0439\u043b\u043e\u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439). \u0415\u0441\u043b\u0438 <code>true<\/code>, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435. <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#skipLibCheck\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><code>strict<\/code> &#8212; \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043f\u0430\u0447\u043a\u0443 \u0440\u0435\u0436\u0438\u043c\u043e\u0432 \u0441\u0442\u0440\u043e\u0433\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041f\u043e\u0441\u043b\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0446\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b. <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#strict\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a> <\/p>\n<\/li>\n<li>\n<p><code>strictPropertyInitialization<\/code> &#8212; \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e, \u043d\u043e \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430. <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#strictPropertyInitialization\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><code>forceConsistentCasingInFileNames<\/code> &#8212; \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0444\u043e\u0440\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443 \u0438\u043c\u0435\u043d\u0438 \u0444\u0430\u0439\u043b\u0430. \u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e, \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445. <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#forceConsistentCasingInFileNames\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a> <\/p>\n<\/li>\n<li>\n<p><code>noEmit<\/code> &#8212; \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u0444\u0430\u0439\u043b\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u0423 \u043d\u0430\u0441 \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u043e\u0439 \u0440\u0443\u043b\u0438\u0442 NextJS \u0438 Webpack, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u044b. <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#noEmit\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><code>esModuleInterop<\/code> &#8212; \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u043f\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043c ES6. <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#esModuleInterop\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><code>module<\/code> &#8212; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430. <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#module\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><code>moduleResolution<\/code> &#8212; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u0432. <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#moduleResolution\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><code>resolveJsonModule<\/code> &#8212; \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d \u043b\u0438 \u0438\u043c\u043f\u043e\u0440\u0442 JSON-\u0444\u0430\u0439\u043b\u043e\u0432. <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#resolveJsonModule\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><code>isolatedModules<\/code> &#8212; \u043d\u0443\u0436\u043d\u043e \u043b\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0444\u0430\u0439\u043b \u043a\u0430\u043a \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c. \u0415\u0441\u043b\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u0432 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 (\u0438\u043b\u0438 \u043f\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0435\u0449\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u0430 \u043a\u043b\u0430\u0441\u0441\/\u0442\u0438\u043f\/ \u0438\u0442.\u0434.) &#8212; \u043f\u0440\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430. <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#isolatedModules\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><code>jsx<\/code> &#8212; \u043a\u0430\u043a\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440, \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442 JSX-\u043a\u043e\u0434. \u041e\u043d, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u0435\u0442 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0437\u0430\u043c\u0435\u043d\u044f\u0442\u044c JSX \u043d\u0430 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0432\u0438\u0434\u0430 React.createElement \u0438\u043b\u0438, \u043a\u0430\u043a \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 &#8212; \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c JSX-\u043a\u043e\u0434 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#jsx\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><code>include<\/code> &#8212; \u043a\u0430\u043a\u0438\u0435 \u0444\u0430\u0439\u043b\u044b \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438<\/p>\n<\/li>\n<li>\n<p><code>exclude<\/code> &#8212; \u0430 \u043a\u0430\u043a\u0438\u0435 &#8212; \u043d\u0435 \u0431\u0443\u0434\u0443\u0442<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<h2>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f NextJS, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a<\/h2>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0434\u043e\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u0440\u043e\u0443\u0442\u0443 \u0438 \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0443<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 &#8212; <code>next-env.d.ts<\/code>, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0440\u0435\u0444\u0435\u0440\u0435\u043d\u0441\u044b \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u043e\u0432 NextJS<\/p>\n<pre><code class=\"javascript\">\/\/\/ &lt;reference types=\"next\" \/> \/\/\/ &lt;reference types=\"next\/types\/global\" \/> \/\/\/ &lt;reference types=\"next\/image-types\/global\" \/><\/code><\/pre>\n<p>\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b &#8212; <code>next.config.js<\/code><\/p>\n<pre><code class=\"javascript\">module.exports = {   reactStrictMode: true, }<\/code><\/pre>\n<p>\u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c, \u0447\u0442\u043e React \u0434\u043e\u043b\u0436\u0435\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u0442\u0440\u043e\u0433\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 (\u0432 \u044d\u0442\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u043b\u044e\u0431\u044b\u0435 \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0435 \u0438 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f React \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0432\u0440\u043e\u0434\u0435 \u0441\u0430\u0439\u0434-\u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u0431\u0443\u0434\u0443\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438)<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043e\u0441\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u043b\u044f NextJS \u0435\u0433\u043e \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043e\u043d \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>pages\/<\/code> \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0414\u0430\u043d\u043d\u0430\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0440\u043e\u0443\u0442\u0435\u0440\u0430: \u043a\u0430\u0436\u0434\u044b\u0439 \u0444\u0430\u0439\u043b \u0432 \u043d\u0435\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0440\u043e\u0443\u0442\u0430 (\u0444\u0430\u0439\u043b index.tsx, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u043c \u0438 \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0440\u043e\u0443\u0442\u0435 <code>\/<\/code>). <\/p>\n<p>\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f pages \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 &#8212; \u044d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u0443\u0441\u0442. \u041f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043a \u043d\u0435\u0439 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0441\u044f \u043a\u0443\u0447\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 &#8212; components, utils, helpers \u0438 \u043f\u0440\u043e\u0447\u0435\u0433\u043e. \u0418\u0445 \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u044f\u0442\u0430\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 pages &#8212; \u0442\u0430\u043c NextJS \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438, \u0438 \u043b\u044e\u0431\u043e\u0439 \u0444\u0430\u0439\u043b\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a, \u0440\u043e\u0436\u0434\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 NextJS \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c (\u043d\u043e \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 create-next-app, \u0447\u0442\u043e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u043e, \u0441\u0430\u043c \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442) \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <code>src<\/code> \u0438 \u0432 \u043d\u0435\u0435 \u0443\u0436\u0435 \u0441\u043f\u0440\u044f\u0442\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\">mkdir -p src\/pages<\/code><\/pre>\n<p>\u0412 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 pages \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b <code>_app.tsx<\/code> (\u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f). \u0412 \u043d\u0435\u043c \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 NextJS &#8212; <code>Head<\/code>, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c title \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/p>\n<pre><code class=\"javascript\">import { AppProps } from 'next\/dist\/next-server\/lib\/router\/router'; import React from 'react'; import Head from 'next\/head';  const MyApp = ({ Component, pageProps }: AppProps): JSX.Element => {   return (     &lt;>       &lt;Head>         &lt;title>NextJS App From Scratch&lt;\/title>       &lt;\/Head>       &lt;Component {...pageProps} \/>     &lt;\/>   ); };  export default MyApp;<\/code><\/pre>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c &#8212; \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c <code>index.tsx<\/code> \u0441 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/p>\n<pre><code class=\"javascript\">const Home = (): JSX.Element => {   return (     &lt;div>       Hello, NextJS!     &lt;\/div>   ); };  export default Home;<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <\/p>\n<pre><code class=\"bash\">npm run dev<\/code><\/pre>\n<p>\u0438 \u0440\u0430\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f &#171;<strong>Hello, NextJS<\/strong>!&#187; \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435<\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u043b\u0438\u043d\u0442\u0435\u0440\u0430<\/h2>\n<p>\u041b\u0438\u043d\u0442\u0438\u043d\u0433 &#8212; \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e. \u041b\u0438\u043d\u0442\u0438\u043d\u0433 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u044b, \u0442\u0438\u043f\u044b \u0438 \u0442\u043e\u0447\u043a\u0438 \u0441 \u0437\u0430\u043f\u044f\u0442\u043e\u0439. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u043b\u0438\u043d\u0442\u0438\u043d\u0433.<\/p>\n<p>\u041f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c NextJS \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043b\u0438\u043d\u0442\u0435\u0440\u0430, \u043a\u0430\u043a \u044d\u0442\u043e \u043d\u0438 \u0441\u0442\u0440\u0430\u043d\u043d\u043e, ESLint. \u0414\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b ESlint \u0441 typescript-\u043a\u043e\u0434\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 <code>.eslintrc<\/code><\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 &#8212; \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0438 \u043f\u0430\u0440\u0441\u0435\u0440\u043e\u0432<\/p>\n<pre><code class=\"bash\">npm i -D eslint eslint-config-next npm i -D @typescript-eslint\/eslint-plugin @typescript-eslint\/parser<\/code><\/pre>\n<p>\u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e<\/p>\n<pre><code class=\"javascript\">{ \"root\": true, \"parser\": \"@typescript-eslint\/parser\", \"plugins\": [ \"@typescript-eslint\" ], \"rules\": { \"semi\": \"off\", \"@typescript-eslint\/semi\": [ \"error\" ], \"@typescript-eslint\/no-empty-interface\": [ \"error\", { \"allowSingleExtends\": true } ] }, \"extends\": [ \"next\", \"next\/core-web-vitals\", \"eslint:recommended\", \"plugin:@next\/next\/recommended\", \"plugin:@typescript-eslint\/eslint-recommended\", \"plugin:@typescript-eslint\/recommended\" ] }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0441\u0435\u0440\u0430 typescript-eslint\/parser, \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u0445 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0442\u043e\u0447\u0435\u043a \u0441 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u043c \u0441\u0432\u043e\u044e (\u043c\u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043b\u0438\u043d\u0442\u0435\u0440<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-382855","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/382855","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=382855"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/382855\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=382855"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=382855"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=382855"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}