{"id":10877,"date":"2020-06-06T11:23:15","date_gmt":"2020-06-06T02:23:15","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=10877"},"modified":"2023-05-27T23:58:06","modified_gmt":"2023-05-27T14:58:06","slug":"%e3%80%90vue-js%e3%80%91webpack%e3%83%93%e3%83%ab%e3%83%89%e3%81%97%e3%81%9f%e5%be%8c%e3%81%ae%e3%80%8cdist%e3%80%8d%e3%83%95%e3%82%a9%e3%83%ab%e3%83%80%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=10877","title":{"rendered":"\u3010Vue.js\u3011webpack\u30d3\u30eb\u30c9\u3057\u305f\u5f8c\u306e\u300cdist\u300d\u30d5\u30a9\u30eb\u30c0\u306b\u3064\u3044\u3066"},"content":{"rendered":"<p>Vue CLI\u306enpm run build\u3067\u30d3\u30eb\u30c9\u3057\u305f\u5f8c\u306bdist\u30d5\u30a9\u30eb\u30c0\u304cVue.js\u306e\u30eb\u30fc\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u751f\u6210\u3055\u308c\u3066Vue\u3067\u5b9f\u88c5\u3057\u305f\u52d5\u7684\u30b3\u30fc\u30c9\u304c\u9759\u7684\u30d5\u30a1\u30a4\u30eb\u306b\u751f\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<table>\n<tbody>\n<tr>\n<th width=\"200\">\u30d5\u30a9\u30eb\u30c0\u540d<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>dist<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\u251ccss<\/td>\n<td>\u5b9f\u969b\u306b\u30b5\u30fc\u30d0\u30fc\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u9759\u7684\u30d5\u30a1\u30a4\u30eb<\/td>\n<\/tr>\n<tr>\n<td>\u251cimg<\/td>\n<td>\u5b9f\u969b\u306b\u30b5\u30fc\u30d0\u30fc\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u9759\u7684\u30d5\u30a1\u30a4\u30eb<\/td>\n<\/tr>\n<tr>\n<td>\u251cjs<\/td>\n<td>\u5b9f\u969b\u306b\u30b5\u30fc\u30d0\u30fc\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u9759\u7684\u30d5\u30a1\u30a4\u30eb<\/td>\n<\/tr>\n<tr>\n<td>\u251capp.XXXX.js<\/td>\n<td>\u958b\u767a\u4e2d\u306e\u30bd\u30fc\u30b9\u3092\u5727\u7e2e\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u251capp.XXXX.js.map<\/td>\n<td>\u958b\u767a\u4e2d\u30bd\u30fc\u30b9\u306e\u30bd\u30fc\u30b9\u30de\u30c3\u30d7\u3001\u958b\u767a\u6642\u306b\u30c7\u30d0\u30c3\u30b0\u3059\u308b\u305f\u3081\u306b\u4f7f\u3044\u307e\u3059\u3002\u672c\u756a\u306b\u306f\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3066\u306f\u30c0\u30e1\u3067\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u251cchunk-vendors.XXXX.js<\/td>\n<td>node_modules\u306b\u5165\u3063\u3066\u3044\u305f\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5727\u7e2e\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u2514chunk-vendors.js.map<\/td>\n<td>node_modules\u306b\u5165\u3063\u3066\u3044\u305f\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5727\u7e2e\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u30bd\u30fc\u30b9\u30de\u30c3\u30d7\u3001\u958b\u767a\u6642\u306b\u30c7\u30d0\u30c3\u30b0\u3059\u308b\u305f\u3081\u306b\u4f7f\u3044\u307e\u3059\u3002\u672c\u756a\u306b\u306f\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3066\u306f\u30c0\u30e1\u3067\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u251cfavicon.ico<\/td>\n<td>\u5b9f\u969b\u306b\u30b5\u30fc\u30d0\u30fc\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u9759\u7684\u30d5\u30a1\u30a4\u30eb<\/td>\n<\/tr>\n<tr>\n<td>\u2514index.html<\/td>\n<td>\u5b9f\u969b\u306b\u30b5\u30fc\u30d0\u30fc\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u9759\u7684\u30d5\u30a1\u30a4\u30eb<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u3053\u308c\u3089\u306edist\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306e\u9759\u7684\u30d5\u30a1\u30a4\u30eb\u3092\u516c\u958b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308c\u3070\u672c\u756a\u516c\u958b\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002\uff08\u4eca\u3060\u3063\u305f\u3089\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u306fS3\u306e\u30db\u30b9\u30c6\u30a3\u30f3\u30b0\u30b5\u30fc\u30d3\u30b9\u306a\u3069\u3092\u4f7f\u3046\u306e\u304c\u4e00\u822c\u7684\u3067\u3057\u3087\u3046\u304b\u306d\u3002\uff09<\/p>\n<h2>\u30bd\u30fc\u30b9\u30de\u30c3\u30d7\u306b\u3064\u3044\u3066<\/h2>\n<p>\u30bd\u30fc\u30b9\u30de\u30c3\u30d7\u3068\u306f\u300cxxx.js.map\u300d\u3068\u306a\u3063\u3066\u3044\u308b\u30d5\u30a1\u30a4\u30eb\u306e\u3053\u3068\u3067\u3059\u3002Vue.js\u958b\u767a\u6642\u306b\u306f\u958b\u767a\u7528\u30bd\u30fc\u30b9\u3067\u8a00\u3048\u3070\u4f55\u884c\u76ee\u306b\u8a72\u5f53\u3059\u308b\u304b\u3092\u628a\u63e1\u3059\u308b\u305f\u3081\u306b\u4f7f\u308f\u308c\u307e\u3059\u3002<\/p>\n<p>\u672c\u756a\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u5834\u5408\u306f\u6d88\u3059\u3053\u3068\u304c\u63a8\u5968\u3055\u308c\u3066\u3044\u307e\u3059\u3002\uff08\u3068\u3044\u3046\u304b\u6d88\u3055\u306a\u3044\u3068\u30c0\u30e1\u3067\u3059\u3002\uff09<\/p>\n<h2>vue.config.js<\/h2>\n<p>Vue.js\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u3002\u3053\u3053\u3067\u516c\u958b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u3064\u3044\u3066\u306e\u8a2d\u5b9a\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3>publicPath<\/h3>\n<p>\u3082\u3057\u3001\u516c\u958b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u3068\u306f\u5c11\u3057\u9055\u3046\u5834\u5408\u306f\u3053\u3053\u306b\u30d1\u30b9\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u516c\u958b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\/path\/index.html\u307f\u305f\u3044\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3042\u308c\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">module.exports = {\r\n  publicPath: process.env.NODE_ENV === 'production' ? '\/path\/' : '\/',<\/pre>\n<p>\u300cprocess.env.NODE_ENV === 'production\u300d\u306b\u3066\u672c\u756a\u30e2\u30fc\u30c9\u306e\u5834\u5408\u3060\u3051\u306b\u9069\u5fdc\u3055\u305b\u3066\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Vue CLI\u306enpm run build\u3067\u30d3\u30eb\u30c9\u3057\u305f\u5f8c\u306bdist\u30d5\u30a9\u30eb\u30c0\u304cVue.js\u306e\u30eb\u30fc\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u751f\u6210\u3055\u308c\u3066Vue\u3067\u5b9f\u88c5\u3057\u305f\u52d5\u7684\u30b3\u30fc\u30c9\u304c\u9759\u7684\u30d5\u30a1\u30a4\u30eb\u306b\u751f\u6210\u3055\u308c\u307e\u3059\u3002 \u30d5\u30a9\u30eb\u30c0\u540d \u8aac\u660e dist \u251ccss \u5b9f\u969b [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[60],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/10877"}],"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=10877"}],"version-history":[{"count":6,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/10877\/revisions"}],"predecessor-version":[{"id":20622,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/10877\/revisions\/20622"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10877"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10877"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10877"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}