Skip to content

lcw2004/vue-multi-modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c8b6c67 · May 17, 2017

History

6 Commits
May 17, 2017
May 17, 2017
May 17, 2017
May 17, 2017
May 17, 2017
May 17, 2017
May 17, 2017
May 17, 2017
May 17, 2017
May 17, 2017
May 17, 2017
May 17, 2017
May 17, 2017

Repository files navigation

vue-multi-modules

Vue多页面工程,参考https://github.com/jarvan4dev/vue-multi-page.git改造而来。

跟这个工程主要有以下几个改动:

  1. 基于最新的Vue-cli重新改造的
  2. 添加了es-lint
  3. 按我的想法调整了以下代码

多模块说明

Vue多模块工程的核心地方有两个:

  1. build\webpack.base.conf.js的entry

    这是每一个模块的的入口js文件

  2. build\webpack.dev.conf.js和build\webpack.prod.conf.js的HtmlWebpackPlugin

    这是每一个模块的html文件打包插件,在打包插件中指定html路径以及入口js文件

vue-cli里面这两个地方是单个的,改为每一个模块一个即为多模块工程。

具体的代码在utils.getEntries和utils.getHtmlWebpackPlugins里面

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

# run unit tests
npm run unit

# run all tests
npm test

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

About

Vue Muti Modules

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published