{"id":5792,"date":"2018-07-15T00:13:43","date_gmt":"2018-07-14T15:13:43","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=5792"},"modified":"2023-05-27T21:39:52","modified_gmt":"2023-05-27T12:39:52","slug":"%e3%80%90nuxt-js%e3%80%91%e4%bd%bf%e7%94%a8%e3%81%a7%e3%81%8d%e3%82%8b%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=5792","title":{"rendered":"\u3010Nuxt.js\u3011\u57fa\u672c\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff08\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044\u554f\u984c\u3001Nuxt.js\u5c02\u7528\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b\u3064\u3044\u3066(nuxt-link\u7b49\uff09\u3001Buefy\uff09\u3001\u4f7f\u7528\u3067\u304d\u308b\u30b3\u30de\u30f3\u30c9\u306b\u3064\u3044\u3066"},"content":{"rendered":"<h2>\u00a0Nuxt.js\u3068\u306f\uff1f<\/h2>\n<p>JavaScript\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u6709\u540d\u306a\u300cVue.js\u300d\u306e\u3055\u3089\u306a\u308b\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>Nuxt.js\u306f\u3001\u300c\u30e6\u30cb\u30d0\u30fc\u30b5\u30eb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u300d\u3092\u4f5c\u6210\u3067\u304d\u308b\u3002<\/h2>\n<h3>\u30e6\u30cb\u30d0\u30fc\u30b5\u30eb\u30a2\u30d7\u30ea\u3068\u306f\uff1f<\/h3>\n<p><span style=\"color: #ff0000;\"><strong>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3068\u30b5\u30fc\u30d0\u30fc\u3069\u3061\u3089\u3067\u3082\u5b9f\u884c\u3067\u304d\u308bJavaScript\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u3053\u3068<\/strong><\/span>\u3067\u3059\u3002(\u4ee5\u524d\u3001<span style=\"color: #ff0000;\"><strong>\u300cisomophic\u300d<\/strong><\/span>\u3068\u547c\u3070\u308c\u3066\u3044\u305f\u6982\u5ff5\u306b\u306a\u308a\u307e\u3059\u3002)<\/p>\n<p>\u8981\u306f\u3001\u540c\u3058JavaScript\u306e\u30b3\u30fc\u30c9\u3067\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30b5\u30a4\u30c9SPA\u3068\u3001SSR(\u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0)\u3092\u5b9f\u73fe\u3057\u3066\u3057\u307e\u3046\u3082\u306e\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>Nuxt.js\u3092\u5229\u7528\u3059\u308c\u3070\u3001Vue.js\u306e\u30d3\u30e5\u30fc\u3068\u3001Nuxt.js\u3092\u5229\u7528\u3057\u3066\u7c21\u5358\u306b\u30e6\u30cb\u30d0\u30fc\u30b5\u30eb\u30a2\u30d7\u30ea\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h4>SPA(Single Page Application)\u3068\u306f\uff1f<\/h4>\n<p>\u4e0b\u8a18\u306e\u8a18\u4e8b\u3067\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"E7c6Ll8eQs\"><p><a href=\"http:\/\/www.code-magagine.com\/?p=5992\">\u3010JavaScript\u3011\u300cSPA\u300d\u306b\u3064\u3044\u3066<\/a><\/p><\/blockquote>\n<p><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" src=\"http:\/\/www.code-magagine.com\/?p=5992&#038;embed=true#?secret=E7c6Ll8eQs\" data-secret=\"E7c6Ll8eQs\" width=\"500\" height=\"282\" title=\"&#8220;\u3010JavaScript\u3011\u300cSPA\u300d\u306b\u3064\u3044\u3066&#8221; &#8212; \u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30de\u30ac\u30b8\u30f3\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<h4>SSR(\u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0)\u3068\u306f\uff1f<\/h4>\n<p>Nuxt.js\u306f\u3001<span style=\"color: #ff0000;\"><strong>UI\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3092\u884c\u3046\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u30b5\u30fc\u30d0\u30fc\u3068\u3057\u3066\u5229\u7528\u3059\u308b<\/strong><\/span>\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u306eUI\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u306f\u3001Nuxt.js\u3067\u69cb\u7bc9\u3057\u305f\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u30b5\u30fc\u30d0\u30fc\u306b\u4efb\u305b\u3066\u3001<span style=\"color: #ff0000;\"><strong>\u52d5\u7684\u306a\u60c5\u5831\u306f\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u53d6\u5f97\u3059\u308b\u8a2d\u8a08\u3068\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/strong><\/span><\/p>\n<h4>\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306e\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\uff1f<\/h4>\n<p>.vue\u30d5\u30a1\u30a4\u30eb\u306b<span style=\"color: #ff0000;\"><strong>\u300casyncData\u30e1\u30bd\u30c3\u30c9\u300d<\/strong><\/span>\u3084<span style=\"color: #ff0000;\"><strong>\u300cfetch\u30e1\u30bd\u30c3\u30c9\u300d<\/strong><\/span>\u7b49\u3092\u8ffd\u52a0\u3057\u3066\u3001\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u60c5\u5831\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u3089\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u30d3\u30e5\u30fc\u3092\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3059\u308b\u524d\u306b\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u3001\u5b8c\u6210\u3057\u305fHTML\u306e\u72b6\u614b\u3067\u30da\u30fc\u30b8\u306b\u8868\u793a\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>\u305d\u306e\u4ed6\u306eNuxt.js\u306e\u7528\u9014<\/h3>\n<p>Nuxt.js\u3092\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3068\u3057\u3066\u5229\u7528\u3057\u3066\u3001express\u7b49\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u4f7f\u7528\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<h2>Nuxt.js\u3092\u300c\u9759\u7684\u30d5\u30a1\u30a4\u30eb\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\u300d\u3068\u3057\u3066\u306e\u6d3b\u7528\u3059\u308b\u3002<\/h2>\n<p>pages\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4e2d\u306e\u3001\u30da\u30fc\u30b8\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u305d\u306e\u307e\u307eHTML\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u51fa\u529b\u3059\u308b<span style=\"color: #ff0000;\"><strong>\u300c\u9759\u7684\u30d5\u30a1\u30a4\u30eb\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\u300d<\/strong><\/span>\u3068\u3057\u3066\u306e\u5f79\u5272\u3082\u884c\u3046\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u51fa\u529b\u3055\u308c\u305fHTML\u306b\u306f\u3001Vue.js\u3084\u3001Vuex\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u305d\u306e\u307e\u307eWeb\u30a2\u30d7\u30ea\u3068\u3057\u3066\u6d3b\u7528\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u300cfirebase hosting\u300d\u3084\u300cGitHub Pages\u300d\u7b49\u306e\u9759\u7684\u30d5\u30a1\u30a4\u30eb\u30db\u30b9\u30c6\u30a3\u30f3\u30b0\u30b5\u30fc\u30d3\u30b9\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u306b\u3088\u308a\u3001<span style=\"color: #ff0000;\"><strong>\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u306a\u30a2\u30d7\u30ea\u3092\u69cb\u7bc9<\/strong><\/span>\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>Nuxt.js\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4f5c\u6210\u624b\u9806<\/h2>\n<p>Ubuntu18.04\u3067\u52d5\u4f5c\u78ba\u8a8d\u3092\u3057\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n<h3>Nuxt.js\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u524d\u306b\u4e8b\u524d\u306b\u3001node.js\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/h3>\n<pre class=\"lang:default decode:true\">sudo apt-get install nodejs<\/pre>\n<h3>yarn\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/h3>\n<pre class=\"lang:default decode:true\">npm i -g yarn<\/pre>\n<h3>\u6b21\u306b\u3001vue-cli\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/h3>\n<p>vue-cli\u3092<span style=\"color: #ff0000;\"><strong>\u30b0\u30ed\u30fc\u30d0\u30eb\u306e\u30d1\u30c3\u30b1\u30fc\u30b8<\/strong><\/span>\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">yarn global add vue-cli<\/pre>\n<h4>vue-cli\u3092\u4f7f\u3046\u7406\u7531<\/h4>\n<p>npm\u3092\u4f7f\u3063\u3066\u30bc\u30ed\u304b\u3089\u4f5c\u6210\u3057\u305f\u5834\u5408\u306f\u3001\u5168\u3066\u81ea\u5206\u3067\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u305f\u3081<span style=\"color: #ff0000;\"><strong>\u975e\u5e38\u306b\u624b\u9593\u304c\u304b\u304b\u308b\u4f5c\u696d<\/strong><\/span>\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>vue-cli\u3092\u4f7f\u3044\u3001\u516c\u5f0f\u306eNuxt.js\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001<span style=\"color: #ff0000;\"><strong>\u5fc5\u8981\u306a\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u69cb\u6210\u304c\u521d\u3081\u304b\u3089\u7528\u610f\u3055\u308c\u305f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304b\u3089\u59cb\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/strong><\/span><\/p>\n<h3>Nuxt.js\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/h3>\n<pre class=\"lang:default decode:true\">vue init nuxt-community\/starter-template (\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u540d)<\/pre>\n<h4>init\u30b3\u30de\u30f3\u30c9\u306b\u3064\u3044\u3066<\/h4>\n<p>vue-cli\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u30b3\u30de\u30f3\u30c9\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3001<span style=\"color: #ff0000;\"><strong>vue-cli\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c3\u7cfb\u3067\u306f\u4f7f\u3048\u306a\u3044\u30ec\u30ac\u30b7\u30fc\u306a\u30b3\u30de\u30f3\u30c9<\/strong><\/span>\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>vue-cli\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u4e0b\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u3067\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">vue --version<\/pre>\n<h3>\u8d77\u52d5\u30b3\u30de\u30f3\u30c9<\/h3>\n<p>\u4f5c\u6210\u3055\u308c\u305f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u30eb\u30fc\u30c8\u306b\u79fb\u52d5\u3057\u3066\u3001\u4e0b\u8a18\u306e\u4e8c\u3064\u306e\u30b3\u30de\u30f3\u30c9\u306e\u3069\u3061\u3089\u304b\u3092\u5b9f\u884c\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<h4>yarn\u3092\u4f7f\u3046\u65b9\u6cd5<\/h4>\n<pre class=\"lang:default decode:true \">yarn dev<\/pre>\n<h4>npm\u3092\u4f7f\u3046\u65b9\u6cd5<\/h4>\n<pre class=\"lang:default decode:true\">npm run dev<\/pre>\n<h3>\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044\u554f\u984c<\/h3>\n<p>\u4e0b\u8a18\u306e\u624b\u9806\u3092\u53c2\u8003\u306b\u3057\u3066\u3001Ubuntu\u306b\u3001Nuxt.js\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u7684\u306a\u30a2\u30d7\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>https:\/\/qiita.com\/corosuke_k\/items\/a5ca4c8184f431e0ee26<\/p>\n<p>\u3057\u304b\u3057\u3001Chrome\u3067<span style=\"color: #ff0000;\"><strong>\u300chttp:\/\/(IP\u30a2\u30c9\u30ec\u30b9):3000\u300d<\/strong><span style=\"color: #000000;\">\u306b<\/span><\/span>\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3082\u3001\u4e0b\u8a18\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u3066\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n<div class=\"graybox\">\n<p>\u3053\u306e\u30b5\u30a4\u30c8\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u305b\u3093\u63a5\u7d9a\u304c\u62d2\u5426\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>ERR_CONNECTION_REFUSED<\/p>\n<\/div>\n<p>Ubunt\u306e\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u306e3000\u756a\u30dd\u30fc\u30c8\u3082\u3042\u3044\u3066\u3044\u308b\u3053\u3068\u306f\u78ba\u8a8d\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5684\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/07\/ubunt_\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb.png\" alt=\"\" width=\"577\" height=\"225\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/07\/ubunt_\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb.png 577w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/07\/ubunt_\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb-300x117.png 300w\" sizes=\"(max-width: 577px) 100vw, 577px\" \/><\/p>\n<p>\u3069\u3046\u3084\u3089\u3001\u6b63\u89e3\u306f\u3001<span style=\"color: #ff0000;\"><strong>Nuxt.js\u306e\u30b3\u30a2\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306b\u3066\u300clocalhost\u300d\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3057\u304b\u8a31\u53ef\u3057\u306a\u3044\u3088\u3046\u306b\u3001URL\u5236\u5fa1\u304c\u30cf\u30fc\u30c9\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3055\u308c\u3066\u3044\u308b<\/strong><\/span>\u3088\u3046\u3067\u3057\u305f\u3002<\/p>\n<p>\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u4e0b\u8a18\u306b\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>node_modules\/nuxt\/lib\/core\/nuxt.js<\/p>\n<p>\u4e0b\u8a18\u306e\u3088\u3046\u306b\u3001locahost\u3067\u30cf\u30fc\u30c9\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3055\u308c\u3066\u3044\u308b\u7b87\u6240\u3092\u3001\u30a2\u30af\u30bb\u30b9\u3057\u305f\u3044\uff29\uff30\u30a2\u30c9\u30ec\u30b9\u306b\u66f8\u304d\u63db\u3048\u307e\u3057\u305f\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5685\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/07\/ubuntu\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u4fee\u6b63.png\" alt=\"\" width=\"917\" height=\"189\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/07\/ubuntu\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u4fee\u6b63.png 917w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/07\/ubuntu\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u4fee\u6b63-300x62.png 300w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/07\/ubuntu\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u4fee\u6b63-768x158.png 768w\" sizes=\"(max-width: 917px) 100vw, 917px\" \/><\/p>\n<p>\u305d\u3046\u3059\u308b\u3053\u3068\u3067\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\uff29\uff30\u7d4c\u7531\u3067\u3082\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5686\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/07\/nuxtjs\u30a2\u30af\u30bb\u30b9\u53ef\u80fd.png\" alt=\"\" width=\"633\" height=\"652\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/07\/nuxtjs\u30a2\u30af\u30bb\u30b9\u53ef\u80fd.png 633w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/07\/nuxtjs\u30a2\u30af\u30bb\u30b9\u53ef\u80fd-291x300.png 291w\" sizes=\"(max-width: 633px) 100vw, 633px\" \/><\/p>\n<h2>\u30b3\u30de\u30f3\u30c9\u4e00\u89a7<\/h2>\n<table>\n<tbody>\n<tr>\n<th width=\"120\">\u30b3\u30de\u30f3\u30c9<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>nuxt<\/td>\n<td>\u958b\u767a\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3067\u8d77\u52d5\u3057\u305f\u30b5\u30fc\u30d0\u30fc\u306f\u30bd\u30fc\u30b9\u306b\u5909\u66f4\u304c\u3042\u3063\u305f\u5834\u5408\u306f\u5373\u5ea7\u306b\u53cd\u6620\u3055\u308c\u308b\u3002\uff08\u30db\u30c3\u30c8\u30ea\u30ed\u30fc\u30c9\uff09<\/td>\n<\/tr>\n<tr>\n<td>nuxt build<\/td>\n<td>\u30a2\u30d7\u30ea\u3092Webpack\u3068\u3057\u3066\u30d3\u30eb\u30c9\u3057\u307e\u3059\u3002\u3053\u306e\u30b3\u30de\u30f3\u30c9\u306f\u300cnuxt start\u30b3\u30de\u30f3\u30c9\u300d\u306e\u524d\u306b\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>nuxt start<\/td>\n<td>\u30d7\u30ed\u30c0\u30af\u30b7\u30e7\u30f3\u30e2\u30fc\u30c9\u3067\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>nuxt generate<\/td>\n<td>Nuxt.js\u306e<span style=\"color: #ff0000;\"><strong>\u9759\u7684\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf<\/strong><\/span>\u306e\u6a5f\u80fd\u3092\u4f7f\u3046\u969b\u306b\u4f7f\u7528\u3059\u308b\u30b3\u30de\u30f3\u30c9\u3067\u3059\u3002\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3067\u306e\u51fa\u529b\u7d50\u679c\u306f\u3001dist\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u914d\u7f6e\u3055\u308c\u307e\u3059\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>--help\u30aa\u30d7\u30b7\u30e7\u30f3<\/h2>\n<p>\u5404\u30b3\u30de\u30f3\u30c9\u306e\u7d30\u304b\u3044\u4f7f\u3044\u65b9\u306f\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>Nuxt.js\u5c02\u7528\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b\u3064\u3044\u3066(nuxt-link\u7b49\uff09<\/h2>\n<h3>\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u4e00\u89a7<\/h3>\n<table>\n<tbody>\n<tr>\n<th width=\"150\">\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>&lt;nuxt-link&gt;<\/td>\n<td>\u73fe\u72b6\u306f\u3001\u300cVue Router\u300d\u306e\u300crouter-link\u300d\u306e\u30e9\u30c3\u30d1\u30fc\u306a\u306e\u3067\u3001\u540c\u3058\u3088\u3046\u306b\u9077\u79fb\u5148\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>&lt;nuxt-child&gt;<\/td>\n<td>\u30cd\u30b9\u30c8\u3055\u308c\u305f\u30eb\u30fc\u30c8\u5185\u3067\u3001\u5b50\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u8868\u793a\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>&lt;nuxt \/&gt;<\/td>\n<td>\u30ec\u30a4\u30a2\u30a6\u30c8\u5185\u3067\u3001\u30da\u30fc\u30b8\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u8868\u793a\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>nuxt-link\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8<\/h3>\n<h4>\u672c\u4f53\u306e\u5834\u6240<\/h4>\n<p>.nuxt\/components\/nuxt-link.js<\/p>\n<h3>nuxt\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8<\/h3>\n<p>\u300clayouts\/\u300d\u306e\u30d5\u30a1\u30a4\u30eb\u5185\u5bb9\u304c\u53cd\u6620\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>404\u30a8\u30e9\u30fc\u304c\u51fa\u305f\u5834\u5408\u306f\u3001<span style=\"color: #ff0000;\"><strong>\u300cerror.vue\u300d<\/strong><\/span>\u306e\u5185\u5bb9\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<h2>Buefy\u306e\u7d44\u307f\u8fbc\u307f<\/h2>\n<p>node_module\u306bbuefy\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">yarn add buefy<\/pre>\n<p>plugins\u30d5\u30a9\u30eb\u30c0\u306b\u3001buefy.js\u3068\u3044\u3046Buefy\u3092\u8aad\u307f\u8fbc\u3080\u305f\u3081\u306e\u8a2d\u5b9a\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">import Vue from 'vue'\r\nimport Buefy from 'buefy'\r\n\r\nVue.use(Buefy)<\/pre>\n<p>nuxt.config.js\u306b\u3001\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u305fplugin\u3092\u767b\u9332\u3059\u308b\u305f\u3081\u306b\u3001\u4e0b\u8a18\u306e\u8a18\u8ff0\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">  plugins: [\r\n    '~plugins\/buefy'\r\n  ]<\/pre>\n<p>\u300clayouts\/default.vue\u300d\u306b\u3001\u4e0b\u8a18\u306eCSS\u306e\u8a18\u8ff0\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">&lt;style src=\"buefy\/lib\/buefy.css\"&gt;&lt;\/style&gt;<\/pre>\n<p>\u5f8c\u306f\u3001\u4e0b\u8a18\u3067\u8d77\u52d5\u3059\u308c\u3070\u3001\uff28\uff34\uff2d\uff2c\u306bbuefy\u306eCSS\u304c\u9069\u7528\u3055\u308c\u305f\u72b6\u614b\u3067\u8d77\u52d5\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">yarn dev<\/pre>\n<h3>\u305f\u3081\u3057\u306b\u3001Buefy\u306e\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u30ea\u30b9\u30c8\u306e\u30b5\u30f3\u30d7\u30eb\u3092\u5b9f\u884c\u3057\u3066\u307f\u308b\u3002<\/h3>\n<p>Buefy\u306e\u516c\u5f0f\u30da\u30fc\u30b8\u306eDocumentation\u306b\u591a\u304f\u306eWeb\u30d1\u30fc\u30c4\u306e\u30b5\u30f3\u30d7\u30eb\u304c\u8ee2\u304c\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>https:\/\/buefy.github.io\/#\/documentation\/dropdown<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5863\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/07\/\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3.png\" alt=\"\" width=\"1524\" height=\"764\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/07\/\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3.png 1524w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/07\/\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3-300x150.png 300w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/07\/\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3-768x385.png 768w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/07\/\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3-1024x513.png 1024w\" sizes=\"(max-width: 1524px) 100vw, 1524px\" \/><\/p>\n<p>\u305d\u306e\u4e2d\u3067\u3001\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u8a66\u3057\u306b\u3001\u30d3\u30e5\u30fc\u306b\u8cbc\u308a\u4ed8\u3051\u3066\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<h4>pages\/index.vue<\/h4>\n<pre class=\"lang:default decode:true \">&lt;template&gt;\r\n    &lt;section&gt;\r\n        &lt;b-dropdown&gt;\r\n            &lt;button class=\"button is-primary\" slot=\"trigger\"&gt;\r\n                &lt;span&gt;Click me!&lt;\/span&gt;\r\n                &lt;b-icon icon=\"menu-down\"&gt;&lt;\/b-icon&gt;\r\n            &lt;\/button&gt;\r\n\r\n            &lt;b-dropdown-item&gt;Action&lt;\/b-dropdown-item&gt;\r\n            &lt;b-dropdown-item&gt;Another action&lt;\/b-dropdown-item&gt;\r\n            &lt;b-dropdown-item&gt;Something else&lt;\/b-dropdown-item&gt;\r\n        &lt;\/b-dropdown&gt;\r\n\r\n        &lt;b-dropdown hoverable&gt;\r\n            &lt;button class=\"button is-info\" slot=\"trigger\"&gt;\r\n                &lt;span&gt;Hover me!&lt;\/span&gt;\r\n                &lt;b-icon icon=\"menu-down\"&gt;&lt;\/b-icon&gt;\r\n            &lt;\/button&gt;\r\n\r\n            &lt;b-dropdown-item&gt;Action&lt;\/b-dropdown-item&gt;\r\n            &lt;b-dropdown-item&gt;Another action&lt;\/b-dropdown-item&gt;\r\n            &lt;b-dropdown-item&gt;Something else&lt;\/b-dropdown-item&gt;\r\n        &lt;\/b-dropdown&gt;\r\n\r\n        &lt;b-dropdown disabled&gt;\r\n            &lt;button class=\"button\" slot=\"trigger\"&gt;\r\n                &lt;span&gt;Disabled&lt;\/span&gt;\r\n                &lt;b-icon icon=\"menu-down\"&gt;&lt;\/b-icon&gt;\r\n            &lt;\/button&gt;\r\n\r\n            &lt;b-dropdown-item&gt;Action&lt;\/b-dropdown-item&gt;\r\n            &lt;b-dropdown-item&gt;Another action&lt;\/b-dropdown-item&gt;\r\n            &lt;b-dropdown-item&gt;Something else&lt;\/b-dropdown-item&gt;\r\n        &lt;\/b-dropdown&gt;\r\n\r\n        &lt;b-dropdown&gt;\r\n            &lt;p class=\"tag is-success\" slot=\"trigger\"&gt;\r\n                Custom trigger\r\n            &lt;\/p&gt;\r\n\r\n            &lt;b-dropdown-item&gt;Action&lt;\/b-dropdown-item&gt;\r\n            &lt;b-dropdown-item&gt;Another action&lt;\/b-dropdown-item&gt;\r\n            &lt;b-dropdown-item&gt;Something else&lt;\/b-dropdown-item&gt;\r\n        &lt;\/b-dropdown&gt;\r\n    &lt;\/section&gt;\r\n&lt;\/template&gt;\r\n\r\n&lt;style scoped&gt;\r\n    .tag {\r\n        cursor: pointer;\r\n    }\r\n&lt;\/style&gt;<\/pre>\n<h4>\u5b9f\u884c\u7d50\u679c<\/h4>\n<p>\u4e0b\u8a18\u306e\u3088\u3046\u306b\u3001\u516c\u5f0f\u30b5\u30f3\u30d7\u30eb\u3069\u304a\u308a\u306e\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u30ea\u30b9\u30c8\u3092\u8868\u793a\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5864\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/07\/\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u30ea\u30b9\u30c8\u8868\u793a.png\" alt=\"\" width=\"515\" height=\"107\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/07\/\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u30ea\u30b9\u30c8\u8868\u793a.png 515w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/07\/\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u30ea\u30b9\u30c8\u8868\u793a-300x62.png 300w\" sizes=\"(max-width: 515px) 100vw, 515px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"\u00a0Nuxt.js\u3068\u306f\uff1f JavaScript\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u6709\u540d\u306a\u300cVue.js\u300d\u306e\u3055\u3089\u306a\u308b\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3068\u306a\u308a\u307e\u3059\u3002 Nuxt.js\u306f\u3001\u300c\u30e6\u30cb\u30d0\u30fc\u30b5\u30eb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u300d\u3092\u4f5c\u6210\u3067\u304d\u308b\u3002 \u30e6\u30cb\u30d0\u30fc\u30b5\u30eb\u30a2\u30d7\u30ea\u3068\u306f\uff1f \u30af\u30e9\u30a4\u30a2 [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[61],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/5792"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5792"}],"version-history":[{"count":7,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/5792\/revisions"}],"predecessor-version":[{"id":20381,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/5792\/revisions\/20381"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5792"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5792"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5792"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}