Skip to content

Commit 76a59d1

Browse files
committed
Merge branch 'template' into develop
# Conflicts: # src/components/global/footer/footer.vue # src/components/global/header/header.vue # src/css/_index.scss # src/css/core/_core.scss # src/index.js # src/index.scss # src/pages/index.vue # src/web.vue # webpack.config.js
2 parents f349552 + e7ee25d commit 76a59d1

File tree

6 files changed

+36
-23
lines changed

6 files changed

+36
-23
lines changed

src/index.js

+4-13
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
import './index.scss';
2+
23
import Vue from 'vue';
3-
import VueRouter from 'vue-router';
4-
import routes from './routes/index';
4+
import router from './router';
55
import Web from './web.vue';
66

7-
Vue.use(VueRouter);
8-
9-
const router = new VueRouter({
10-
mode: 'history',
11-
routes
12-
});
13-
147
new Vue({
15-
el: '#app',
16-
components: { Web },
17-
template: '<web/>',
8+
render: h => h(Web),
189
router
19-
});
10+
}).$mount('#app');

src/pages/404.vue

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<template>
2+
<div>
3+
<h1>404 Page Not Found</h1>
4+
</div>
5+
</template>

src/pages/routes.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import Root from './index.vue';
2+
import NotFound from './404.vue';
3+
4+
export default [
5+
{
6+
path: '/',
7+
component: Root
8+
},
9+
{
10+
path: '*',
11+
component: NotFound
12+
}
13+
];

src/router.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import Vue from 'vue';
2+
import Router from 'vue-router';
3+
import routes from './pages/routes';
4+
5+
Vue.use(Router);
6+
7+
export default new Router({
8+
mode: 'history',
9+
routes
10+
});

src/routes/index.js

-8
This file was deleted.

webpack.config.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ module.exports = {
1212
entry: './src/index.js',
1313
output: {
1414
filename: 'bundle.js',
15-
path: dist
15+
path: dist,
16+
publicPath: '/'
1617
},
1718
module: {
1819
rules: [
@@ -79,6 +80,7 @@ module.exports = {
7980
devServer: {
8081
open: true,
8182
contentBase: dist,
82-
watchContentBase: true
83+
watchContentBase: true,
84+
historyApiFallback: true
8385
}
8486
};

0 commit comments

Comments
 (0)