1.更改网站名:

index.html

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1.0">
  6. <title>时光客栈</title>
  7. </head>
  8. <body>
  9. <div id="app"></div>
  10. <!-- built files will be auto injected -->
  11. </body>
  12. </html>

查看效果:

2.更改项目端口号8090:

config/index.js

  1. 'use strict'
  2. // Template version: 1.3.1
  3. // see http://vuejs-templates.github.io/webpack for documentation.
  4.  
  5. const path = require('path')
  6.  
  7. module.exports = {
  8. dev: {
  9.  
  10. // Paths
  11. assetsSubDirectory: 'static',
  12. assetsPublicPath: '/',
  13. proxyTable: {},
  14.  
  15. // Various Dev Server settings
  16. host: 'localhost', // can be overwritten by process.env.HOST
  17. port: 8090, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
  18. autoOpenBrowser: false,
  19. errorOverlay: true,
  20. notifyOnErrors: true,
  21. poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
  22.  
  23. /**
  24. * Source Maps
  25. */
  26.  
  27. // https://webpack.js.org/configuration/devtool/#development
  28. devtool: 'cheap-module-eval-source-map',
  29.  
  30. // If you have problems debugging vue-files in devtools,
  31. // set this to false - it *may* help
  32. // https://vue-loader.vuejs.org/en/options.html#cachebusting
  33. cacheBusting: true,
  34.  
  35. cssSourceMap: true
  36. },
  37.  
  38. build: {
  39. // Template for index.html
  40. index: path.resolve(__dirname, '../dist/index.html'),
  41.  
  42. // Paths
  43. assetsRoot: path.resolve(__dirname, '../dist'),
  44. assetsSubDirectory: 'static',
  45. assetsPublicPath: '/',
  46.  
  47. /**
  48. * Source Maps
  49. */
  50.  
  51. productionSourceMap: true,
  52. // https://webpack.js.org/configuration/devtool/#production
  53. devtool: '#source-map',
  54.  
  55. // Gzip off by default as many popular static hosts such as
  56. // Surge or Netlify already gzip all static assets for you.
  57. // Before setting to `true`, make sure to:
  58. // npm install --save-dev compression-webpack-plugin
  59. productionGzip: false,
  60. productionGzipExtensions: ['js', 'css'],
  61.  
  62. // Run the build command with an extra argument to
  63. // View the bundle analyzer report after build finishes:
  64. // `npm run build --report`
  65. // Set to `true` or `false` to always turn it on or off
  66. bundleAnalyzerReport: process.env.npm_config_report
  67. }
  68. }

查看效果:

2.vue脚手架项目配置的更多相关文章

  1. VUE前端项目配置代理解决跨域问题

    VUE前端项目配置代理解决跨域问题 问题如下,经常在本地调试接口出现这种问题 解决方式1:Chrome 的扩展插件 以前使用Chrome 的扩展插件,但是有时候还是会出现莫名其妙的问题. 需要梯子才行 ...

  2. VUE 脚手架项目搭建

    1. 概述 1.1 说明 vue-cli是一个官方发布vue.js项目脚手架,使用vue-cli可以快速创建vue项目.GitHub地址是:https://github.com/vuejs/vue-c ...

  3. Vue基础项目配置

    一,使用Vuejs搭建项目需要一些基础配置,这样能使的编程过程事半功倍 1.首先下载nodejs,然后使用nodejs使用NPM命令下载VueCli3.0以上的Vue脚手架.通过脚手架可以使用Vue  ...

  4. Vue + webpack 项目配置化、接口请求统一管理

    准备工作 需求由来: 当项目越来越大的时候提高项目运行编译速度.压缩代码体积.项目维护.bug修复......等等成为不得不考虑而且不得不做的问题.  又或者后面其他同事接手你的模块,或者改你的bug ...

  5. vue cli3 项目配置

    [转]https://juejin.im/post/5c63afd56fb9a049b41cf5f4 基于vue-cli3.0快速构建vue项目 本章详细介绍使用vue-cli3.0来搭建项目. 本章 ...

  6. 安装Vue和创建一个Vue脚手架项目

    首先 安装node.js,安装成功可以在控制台输入[node --version ]查看node的版本,因为安装了node会自带npm所以我们可以用 [npm --version]查到npm版本  如 ...

  7. vue创建项目配置脚手架vue-cli环境出错

    1.at process._tickCallback (internal/process/next_tick.js:188:7)  npm ERR! message: 'request to http ...

  8. Vue+webpack项目配置便于维护的目录结构

    新建项目的时候创建合理的目录结构便于后期的维护是很重要 环境:vue.webpack 目录结构: 项目子目录结构 子目录结构都差不多,主要目录是在src下面操作 src目录结构 src/common ...

  9. Vue创建项目配置

    前言 安装VS Code,开始vue的学习及编程,但是总是遇到各种各样的错误,控制台语法错误,格式错误.一股脑的袭来,感觉创建个项目怎么这个麻烦.这里就讲一下vue的安装及创建. 安装环境 当然第一步 ...

随机推荐

  1. Python + Selenium 练习篇 - 获取页面所有邮箱

    代码如下: # coding=utf-8import re    #python中利用正则,需要导入re模块from selenium import webdriverdriver = webdriv ...

  2. C语言有GetOpenFile吗?

    windows中有个GetOpenFile的函数,就是上面那个啦!!我们怎么来实现呢?要我用C语言写出来我真的跪了..但是我们可以输入文件的[绝对路径],配合fopen函数来实现的.. 注意问题 ①文 ...

  3. Linux cp命令拷贝 不覆盖原有的文件

    cp 参数说明: -i或--interactive  覆盖既有文件之前先询问用户. -r  递归处理,将指定目录下的文件与子目录一并处理. -R或--recursive  递归处理,将指定目录下的所有 ...

  4. [转]Loading, Editing, and Saving a Text File in HTML5 Using Javascript

    本文转自:http://thiscouldbebetter.wordpress.com/2012/12/18/loading-editing-and-saving-a-text-file-in-htm ...

  5. 当前activity透明度的获取与修改

    WindowManager.LayoutParams lp = getWindow().getAttributes();//layoutparams是静态类不能通过new来完成. lp.alpha = ...

  6. MATLAB特殊矩阵以及矩阵转置

    特殊矩阵 通用特殊矩阵 zeros函数:产生全0矩阵,即零矩阵. ones函数:产生....1矩阵,即幺矩阵. eye函数:产生对角线为1的矩阵,当矩阵是方正时,得到单位矩阵. rand函数:产生(0 ...

  7. a :hover 和a:hover 区别

    article a :hover {  color: red;} 上面表示 article 内所有a 标签的所有子标签在hover时是红色 article a:hover {  color: red; ...

  8. spring的IOC和AOP详细讲解

    1.解释spring的ioc? 几种注入依赖的方式?spring的优点? IOC你就认为他是一个生产和管理bean的容器就行了,原来需要在调用类中new的东西,现在都是有这个IOC容器进行产生,同时, ...

  9. jQuery 3 有哪些新东西

    jQuery 的横空出世,至今已有十个年头了,而它的长盛不衰显然不是没有理由的.jQuery 提供了极为友好的接口,使得开发者们可以方便地进行 DOM 操作.发起 Ajax 请求.生成动画……不一而足 ...

  10. IDEA配置 tomcat server