{"id":1299,"date":"2025-05-02T11:59:21","date_gmt":"2025-05-02T02:59:21","guid":{"rendered":"https:\/\/shinke1987.net\/?p=1299"},"modified":"2025-05-02T11:59:21","modified_gmt":"2025-05-02T02:59:21","slug":"reactts-vite%e3%82%b3%e3%83%bc%e3%83%89%e3%81%ae%e9%9b%a3%e8%aa%ad%e5%8c%96%e3%81%ae%e5%8b%95%e4%bd%9c%e7%a2%ba%e8%aa%8d","status":"publish","type":"post","link":"https:\/\/shinke1987.net\/?p=1299","title":{"rendered":"React(TS, Vite)\u30b3\u30fc\u30c9\u306e\u96e3\u8aad\u5316\u306e\u52d5\u4f5c\u78ba\u8a8d"},"content":{"rendered":"\n<h2 id=\"toc0\" class=\"wp-block-heading\">\u53c2\u8003\u30b5\u30a4\u30c8<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/github.com\/elmeet\/vite-plugin-javascript-obfuscator\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">https:\/\/github.com\/elmeet\/vite-plugin-javascript-obfuscator<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.npmjs.com\/package\/javascript-obfuscator\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">https:\/\/www.npmjs.com\/package\/javascript-obfuscator<\/a><\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h2 id=\"toc1\" class=\"wp-block-heading\">\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n\n\n\n<p>\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308c\u3070\u826f\u3044\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nnpm install vite-plugin-javascript-obfuscator\n<\/pre><\/div>\n\n\n<h2 id=\"toc2\" class=\"wp-block-heading\">vite.config.js \u306e\u7de8\u96c6<\/h2>\n\n\n\n<p>\u958b\u767a\u7528\u30b5\u30fc\u30d0\u3092\u8d77\u52d5\u3059\u308bnpm run dev\u30b3\u30de\u30f3\u30c9\u3068\u3001<br>\u30d3\u30eb\u30c9\u3059\u308bnpm run build\u30b3\u30de\u30f3\u30c9\u3067\u5b9f\u884c\u3059\u308b\u5185\u5bb9\u3092\u5206\u3051\u3066\u3044\u308b\u306e\u3067\u3001options\u306eapply\u306f\u6307\u5b9a\u3057\u306a\u3044\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u4e0b\u8a18\u5185\u5bb9\u3092plugins\u306e\u914d\u5217\u3078\u8ffd\u52a0\u3059\u308b\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nobfuscatorPlugin({\n                    options: {\n                        exclude: &#x5B;\/node_modules\/],\n                        debugProtection: true,\n                    },\n                }),\n<\/pre><\/div>\n\n\n<p>debugProtection\u306b\u3064\u3044\u3066<br><a href=\"https:\/\/github.com\/javascript-obfuscator\/javascript-obfuscator?tab=readme-ov-file#debugprotection\">https:\/\/github.com\/javascript-obfuscator\/javascript-obfuscator?tab=readme-ov-file#debugprotection<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 id=\"toc3\" class=\"wp-block-heading\">\u7d50\u679c\u78ba\u8a8d<\/h2>\n\n\n\n<p>ReactRouter\u3067\u8a2d\u5b9a\u3057\u305f404\u30da\u30fc\u30b8\u7528\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u5185\u5bb9\u3092\u6bd4\u8f03\u3057\u306a\u304c\u3089\u898b\u308b\u3068\u3001<br>\u96e3\u8aad\u5316\u306e\u76ee\u7684\u306f\u9054\u6210\u3067\u304d\u3066\u3044\u308b\u306e\u3067\u826f\u3057\u3068\u3059\u308b\u3002<\/p>\n\n\n\n<h3 id=\"toc4\" class=\"wp-block-heading\">\u96e3\u8aad\u5316\u3057\u3066\u3044\u306a\u3044\u30b3\u30fc\u30c9<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport {j as e} from &quot;.\/Demo-D_zvdyIk.js&quot;;\nfunction t() {\n    return e.jsx(&quot;div&quot;, {\n        className: &quot;flex justify-center&quot;,\n        children: e.jsxs(&quot;div&quot;, {\n            className: &quot;flex flex-col items-center pt-20&quot;,\n            children: &#x5B;e.jsx(&quot;div&quot;, {\n                className: &quot;text-9xl&quot;,\n                children: &quot;404&quot;\n            }), e.jsx(&quot;div&quot;, {\n                className: &quot;my-4 text-2xl&quot;,\n                children: &quot;Not Found&quot;\n            })]\n        })\n    })\n}\nexport {t as T};\n<\/pre><\/div>\n\n\n<p><\/p>\n\n\n\n<h2 id=\"toc5\" class=\"wp-block-heading\">\u96e3\u8aad\u5316\u3057\u305f\u30b3\u30fc\u30c9<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport {j as u} from &quot;.\/jsx-runtime-C0Rai-_4.js&quot;;\n(function(n, e) {\n    for (var t = r, x = n(); ; )\n        try {\n            var c = parseInt(t(386)) \/ 1 + parseInt(t(365)) \/ 2 + parseInt(t(360)) \/ 3 + -parseInt(t(372)) \/ 4 + -parseInt(t(385)) \/ 5 * (-parseInt(t(378)) \/ 6) + parseInt(t(373)) \/ 7 + parseInt(t(380)) \/ 8 * (-parseInt(t(381)) \/ 9);\n            if (c === e)\n                break;\n            x.push(x.shift())\n        } catch {\n            x.push(x.shift())\n        }\n}\n)(i, 982619);\nvar f = function() {\n    var n = !0;\n    return function(e, t) {\n        var x = n ? function() {\n            var c = r;\n            if (t) {\n                var a = t&#x5B;c(383)](e, arguments);\n                return t = null,\n                a\n            }\n        }\n        : function() {}\n        ;\n        return n = !1,\n        x\n    }\n}();\n(function() {\n    f(this, function() {\n        var n = r\n          , e = new RegExp(n(376))\n          , t = new RegExp(n(361),&quot;i&quot;)\n          , x = s(&quot;init&quot;);\n        !e.test(x + &quot;chain&quot;) || !t&#x5B;n(382)](x + n(367)) ? x(&quot;0&quot;) : s()\n    })()\n}\n)();\nfunction l() {\n    var n = r;\n    return u.jsx(n(377), {\n        className: n(384),\n        children: u.jsxs(&quot;div&quot;, {\n            className: &quot;flex flex-col items-center pt-20&quot;,\n            children: &#x5B;u.jsx(n(377), {\n                className: n(362),\n                children: n(368)\n            }), u.jsx(n(377), {\n                className: n(363),\n                children: n(371)\n            })]\n        })\n    })\n}\nfunction r(n, e) {\n    var t = i();\n    return r = function(x, c) {\n        x = x - 360;\n        var a = t&#x5B;x];\n        return a\n    }\n    ,\n    r(n, e)\n}\nfunction i() {\n    var n = &#x5B;&quot;855436xWMCen&quot;, &quot;12432896IjAXjQ&quot;, &quot;call&quot;, &quot;length&quot;, &quot;function *\\\\( *\\\\)&quot;, &quot;div&quot;, &quot;11958IJksnh&quot;, &quot;string&quot;, &quot;8gYAEaD&quot;, &quot;42920163Rcokvx&quot;, &quot;test&quot;, &quot;apply&quot;, &quot;flex justify-center&quot;, &quot;3075bOinQy&quot;, &quot;1519009uNzKlm&quot;, &quot;629487WwuXsT&quot;, &quot;\\\\+\\\\+ *(?:&#x5B;a-zA-Z_$]&#x5B;0-9a-zA-Z_$]*)&quot;, &quot;text-9xl&quot;, &quot;my-4 text-2xl&quot;, &quot;action&quot;, &quot;2469448PuRgxH&quot;, &quot;debu&quot;, &quot;input&quot;, &quot;404&quot;, &quot;constructor&quot;, &quot;while (true) {}&quot;, &quot;Not Found&quot;];\n    return i = function() {\n        return n\n    }\n    ,\n    i()\n}\nfunction s(n) {\n    function e(t) {\n        var x = r;\n        if (typeof t === x(379))\n            return (function(c) {}\n            )&#x5B;x(369)](x(370))&#x5B;x(383)](&quot;counter&quot;);\n        (&quot;&quot; + t \/ t)&#x5B;x(375)] !== 1 || t % 20 === 0 ? (function() {\n            return !0\n        }\n        )&#x5B;x(369)](x(366) + &quot;gger&quot;)&#x5B;x(374)](x(364)) : (function() {\n            return !1\n        }\n        ).constructor(x(366) + &quot;gger&quot;)&#x5B;x(383)](&quot;stateObject&quot;),\n        e(++t)\n    }\n    try {\n        if (n)\n            return e;\n        e(0)\n    } catch {}\n}\nexport {l as T};\n<\/pre><\/div>\n\n\n<p><\/p>\n\n\n\n<h3 id=\"toc6\" class=\"wp-block-heading\">\u30c7\u30d9\u30ed\u30c3\u30d1\u30fc\u30c4\u30fc\u30eb\uff08options\u306edebugProtection\u306e\u52d5\u4f5c\u78ba\u8a8d\uff09<\/h3>\n\n\n\n<p>Chrome\u306e\u30c7\u30d9\u30ed\u30c3\u30d1\u30fc\u30c4\u30fc\u30eb\u3092\u958b\u3044\u305f\u72b6\u614b\u3067\u3001\u96e3\u8aad\u5316\u5f8c\u306e\u30b3\u30fc\u30c9\u3092\u542b\u3080Web\u30da\u30fc\u30b8\u3092\u8868\u793a\u3059\u308b\u3068<\/p>\n\n\n\n<p>\u5ef6\u3005\u3068\u7121\u610f\u5473\u306a\u30d6\u30ec\u30a4\u30af\u30dd\u30a4\u30f3\u30c8\u3067\u6b62\u3081\u3089\u308c\u3066\u3001Web\u30da\u30fc\u30b8\u304c\u8868\u793a\u3067\u304d\u306a\u304f\u306a\u308b\u3002<\/p>\n\n\n\n<p>\u305f\u3060\u3057\u3001Web\u30da\u30fc\u30b8\u3092\u8868\u793a\u5f8c\u30c7\u30d9\u30ed\u30c3\u30d1\u30fc\u30c4\u30fc\u30eb\u3092\u958b\u304f\u3068\u96e3\u8aad\u5316\u5f8c\u306e\u30b3\u30fc\u30c9\u306f\u78ba\u8a8d\u3067\u304d\u308b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53c2\u8003\u30b5\u30a4\u30c8 \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308c\u3070\u826f\u3044\u3002 vite.config.js \u306e\u7de8\u96c6 \u958b\u767a\u7528\u30b5\u30fc\u30d0\u3092\u8d77\u52d5\u3059\u308bnpm run dev\u30b3\u30de\u30f3\u30c9\u3068\u3001\u30d3\u30eb\u30c9\u3059\u308bnpm run build\u30b3\u30de\u30f3\u30c9\u3067\u5b9f\u884c\u3059\u308b\u5185\u5bb9\u3092\u5206\u3051\u3066\u3044 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[104],"tags":[4,105],"class_list":["post-1299","post","type-post","status-publish","format-standard","hentry","category-react","tag-javascript","tag-react"],"_links":{"self":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts\/1299","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1299"}],"version-history":[{"count":3,"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts\/1299\/revisions"}],"predecessor-version":[{"id":1302,"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts\/1299\/revisions\/1302"}],"wp:attachment":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1299"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}