亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

vue cli3 環境變量設置

vue cli3 環境變量設置

呼如林 2018-09-23 17:09:13
在vue cli 創建的項目里面, 設置環境變量,報錯 not defined問題出現的環境背景及自己嘗試過哪些方法相關代碼// 請把代碼文本粘貼到下方(請勿用圖片代替代碼)\//.env 文件 VUE_APP_TITLE=測試標題 // public/index.html  <!DOCTYPE html> <html>   <head>     <meta charset="utf-8">     <meta http-equiv="X-UA-Compatible" content="IE=edge">     <meta name="viewport" content="width=device-width,initial-scale=1.0">     <link rel="icon" href="<%= BASE_URL %>favicon.ico">     <title><%= VUE_APP_TITLE %></title>   </head>   <body>     <noscript>       <strong>We're sorry but vue-test-3 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>     </noscript>     <div id="app"></div>     <!-- built files will be auto injected -->   </body> </html>期望頁面title顯示"測試標題",但是有報錯"ReferenceError: VUE_APP_TITLE is not defined"
查看完整描述

1 回答

?
紫衣仙女

TA貢獻1839條經驗 獲得超15個贊

process.env.VUE_APP_TITLE

查看完整回答
反對 回復 2018-09-23
  • 1 回答
  • 0 關注
  • 1631 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號