﻿{"id":2081,"date":"2020-03-07T13:11:03","date_gmt":"2020-03-07T05:11:03","guid":{"rendered":"http:\/\/jilin.hydesign.tw\/?p=2081"},"modified":"2021-10-23T21:11:52","modified_gmt":"2021-10-23T13:11:52","slug":"vue-webpack","status":"publish","type":"post","link":"http:\/\/jilin.hydesign.tw\/index.php\/2020\/03\/07\/vue-webpack\/","title":{"rendered":"Vue webpack"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">\u5b89\u88ddwebpack (\u6a21\u677f)<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>npm install webpack -g\n(\u5378\u8f09 npm uninstall webpack -g)\nvue init webpack my-project(\u5c08\u6848\u540d\u7a31)\n\n? Project name my-project(\u5c08\u6848\u540d\u7a31)\n? Project description A Vue.js project(\u5c08\u6848\u63cf\u8ff0) \n? Author xxx &lt;xxx@xxx.com> (\u958b\u767c\u8005) \n? Vue build standalone \n? Install vue-router? Yes \n? Use ESLint to lint your code? No \n? Set up unit tests No \n? Setup e2e tests with Nightwatch? No \n? Should we run `npm install` for you after the project has been created? (recommended) npm\n\n\/\/ 1.\uff08\u8b6f\uff1a\u904b\u884c+\u7de8\u8b6f\uff1a\u88ab\u63a8\u85a6\u7d66\u5927\u591a\u6578\u7528\u6236\uff09\n> Runtime + Compiler\uff1a\u5efa\u8b70\u5927\u591a\u6578\u7528\u6236\u4f7f\u7528\n\/\/ 2.\uff08\u8b6f\uff1a\u53ea\u904b\u884c\u5927\u7d046KB\u6bd4\u8f03\u8f15\u91cf\u7684\u58d3\u7e2e\u6587\u4ef6\uff0c\u4f46\u53ea\u5141\u8a31\u6a21\u677f\uff08\u6216\u4efb\u4f55VUE\u7279\u5b9aHTML\uff09\u3002\n\/\/\u4e0d\u51c6\u78ba\uff0c\u610f\u601d\u662f\u9078\u64c7\u8a72\u69cb\u5efa\u65b9\u5f0f\u5c0d\u6587\u4ef6\u5927\u5c0f\u6709\u8981\u6c42\uff09\n>\u50c5\u904b\u884c\u6642\uff1amin + gzip\u8f15\u7d046KB\uff0c\u4f46\u50c5\u6a21\u677f\uff08\u6216\u4efb\u4f55Vue\u7279\u5b9a\u7684HTML\uff09\n.vue\u6587\u4ef6\u4e2d\u5141\u8a31\u7684\u6e32\u67d3\u529f\u80fd\u5728\u5176\u4ed6\u4f4d\u7f6e\u662f\u5fc5\u9700\u7684\n\ninstall vue-router?y\nUse ESLint to lint your code?n\nSetup unit tests? n\nSetup e2e tests with Nightwatch(Y\/n)?n\nShould we run 'npm install' for you after the project has been created? yes use npm\n\ncd my-project\nsudo npm install\nsudo npm run dev\n\n\u9023\u7d50  http:\/\/localhost:8080<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88ddwebpack (\u6a21\u677f)<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37,40,4],"tags":[],"class_list":["post-2081","post","type-post","status-publish","format-standard","hentry","category-vue","category-web-frame","category-notes"],"_links":{"self":[{"href":"http:\/\/jilin.hydesign.tw\/index.php\/wp-json\/wp\/v2\/posts\/2081","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/jilin.hydesign.tw\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/jilin.hydesign.tw\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/jilin.hydesign.tw\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/jilin.hydesign.tw\/index.php\/wp-json\/wp\/v2\/comments?post=2081"}],"version-history":[{"count":4,"href":"http:\/\/jilin.hydesign.tw\/index.php\/wp-json\/wp\/v2\/posts\/2081\/revisions"}],"predecessor-version":[{"id":2095,"href":"http:\/\/jilin.hydesign.tw\/index.php\/wp-json\/wp\/v2\/posts\/2081\/revisions\/2095"}],"wp:attachment":[{"href":"http:\/\/jilin.hydesign.tw\/index.php\/wp-json\/wp\/v2\/media?parent=2081"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/jilin.hydesign.tw\/index.php\/wp-json\/wp\/v2\/categories?post=2081"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/jilin.hydesign.tw\/index.php\/wp-json\/wp\/v2\/tags?post=2081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}