vue-mpa
v0.2.6
Published
A Vue MPA boilerplate extend extend from vuejs-template/webpack
Downloads
23
Readme
vue-mpa-boilerplate
A Vue MPA boilerplate extend extend from vuejs-template/webpack
Useage
use it with vue-cli
(suggest)
$ npm install vue-cli -g
$ vue init kitwon/vue-mpa your-project-name
or use global command
$ npm install vue-mpa -g
$ vue-mpa-init your-project-name
What's different
- generate multiple page aplication not single page, has all vue-cli/webpack functions
- unit test use jest to instead mocha
Notice
- due to use the multiple entry, so the middle ware
connect-history-api-fallback
will break. - if you want to set dev server route, use the express router, you can get the assets file in memory fs, such as
app.get('/', (req, res, next) => {
// filepath on the same path as dev file
compiler.outputFileSystem.readFile(filepath, (err, result) => {
if (err) {
console.log(err)
next(err)
}
res.set('content-type', 'text/html')
res.send(result)
})
})