a interesting Vue project template
- Vue2
- Webpack2
- HotModuleReplacement
- Server Side Render
- Express
# install dependencies
npm i
npm install supervisor -g
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# run app
npm start
- build webpack config
- client front end project
- server back end project (router/view)
- app.js app entry
getEntries( webpackHotMiddlewareConfig, // String webpackHotMiddlewareConfig, exceptList, // Array except some dir in client isServer // Boolean )
const getEntries = require('./getEntries')
const webpackHotMiddlewareConfig = 'webpack-hot-middleware/client?path=/__webpack_hmr&timeout=20000'
const developmentConf = merge(baseConfig, {
...
entry: getEntries(webpackHotMiddlewareConfig, [], false)
...
})