Commit ed73c75fca417fb6f1bb9b302ac1a947c1cc214d

Authored by liuqimichale
1 parent 113789f5

公共头部

build/webpack.base.conf.js
@@ -65,7 +65,18 @@ module.exports = { @@ -65,7 +65,18 @@ module.exports = {
65 }, 65 },
66 { 66 {
67 test:/\.scss$/,loaders: ["style", "css", "sass"], 67 test:/\.scss$/,loaders: ["style", "css", "sass"],
68 - } 68 + },
  69 + {
  70 + test: /\.vue$/,
  71 + loader: 'vue-loader',
  72 + options: {
  73 + loaders: {
  74 + scss: 'style-loader!css-loader!sass-loader',
  75 + sass: 'style-loader!css-loader!sass-loader?indentedSyntax',
  76 + },
  77 + },
  78 + },
  79 +
69 ] 80 ]
70 }, 81 },
71 node: { 82 node: {
src/router/index.js
@@ -10,12 +10,12 @@ export default new Router({ @@ -10,12 +10,12 @@ export default new Router({
10 { 10 {
11 path: '/', 11 path: '/',
12 name: 'home', 12 name: 'home',
13 - component: home 13 + component: () => import('@/views/home/index')
14 }, 14 },
15 { 15 {
16 path: '/home', 16 path: '/home',
17 name: 'home', 17 name: 'home',
18 - component: home 18 + component: () => import('@/views/home/index')
19 }, 19 },
20 { 20 {
21 path: '/about', 21 path: '/about',
src/views/home/index.vue
@@ -8,6 +8,6 @@ export default { @@ -8,6 +8,6 @@ export default {
8 } 8 }
9 </script> 9 </script>
10 10
11 -<style scoped lang=""> 11 +<style scoped lang="scss">
12 12
13 </style> 13 </style>