Skip to content

muzi8/multiPage-demo

Repository files navigation

demo

A Vue.js project

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

For a detailed explanation on how things work, check out the guide and docs for vue-loader.

just a demo

这个demo是用vue-cli生成,然后改编里面的webpack完成的,仅仅是添加了home.htmlsrc/home.jssrc/Home.vue(我这里的版本vue 2.5.2 webpack 3.6.0

npm run dev之后,打开8080端口默认走的是index.html,也就是说http://localhost:8080/http://localhost:8080/index.html显示的是一个,http://localhost:8080/home.html显示的就是增加的那个页面的。只需要改变地址就行。
打包之后在dist目录下会出现两个html。一个home.html一个index.html,它们共用一个static文件夹的静态资源。
【PS,特别提示一下,如果直接打包,可能会出现静态资源的引用路径问题,这个时候要修改config/index.jsbuild那一块中assetsPublicPath的值,将/改成./

About

多页应用模板

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published