microsoft / TypeScript-Vue-Starter

A starter template for TypeScript and Vue with a detailed README describing how to use the two together.
MIT License
4.45k stars 592 forks source link

vue-loader was used without the corresponding plugin #52

Closed saiyijinprince closed 6 years ago

saiyijinprince commented 6 years ago

Trying to do the Single File Component section, and I'm getting this error and I try to do npm run build:

ERROR in ./src/components/Hello.vue Module Error (from ./node_modules/vue-loader/lib/index.js): vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config. @ ./src/index.ts 3:0-52 9:24-38

ERROR in ./src/components/Hello.vue?vue&type=template&id=5de655f2 2:0 Module parse failed: Unexpected token (2:0) You may need an appropriate loader to handle this file type. |

|
Hello {{name}}{{exclamationMarks}}

| <button @click="decrement">- @ ./src/components/Hello.vue 1:0-83 11:2-8 12:2-17 @ ./src/index.ts

ERROR in ./src/components/Hello.vue?vue&type=script&lang=ts 30:26 Module parse failed: Unexpected token (30:26) You may need an appropriate loader to handle this file type. | }, | computed: {

    exclamationMarks(): string {

| return Array(this.enthusiasm + 1).join('!'); | } @ ./src/components/Hello.vue 2:0-56 3:0-51 3:0-51 10:2-8 @ ./src/index.ts

ERROR in ./src/components/Hello.vue?vue&type=style&index=0&lang=css 38:0 Module parse failed: Unexpected token (38:0) You may need an appropriate loader to handle this file type.

.greeting { | font-size: 20px; | } @ ./src/components/Hello.vue 4:0-64 @ ./src/index.ts

Sorry if I missed anything obvious, I'm new to web development.

saiyijinprince commented 6 years ago

Closing this out,

Was able to resolve this issue with #47