Open adachishohei opened 5 years ago
ERROR Failed to compile with 1 errors friendly-errors 17:39:48
ERROR in ./pages/index.vue?vue&type=script&lang=ts& friendly-errors 17:39:48
Module parse failed: Unexpected character '@' (19:0) friendly-errors 17:39:48
File was processed with these loaders:
* ./node_modules/vue-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
| import Logo from '../components/Logo.vue'
|
> @Component({
| components: {
| Logo
friendly-errors 17:39:48
@ ./pages/index.vue?vue&type=script&lang=ts& 1:0-117 1:133-136 1:138-252 1:138-252
@ ./pages/index.vue
@ ./.nuxt/router.js
@ ./.nuxt/index.js
@ ./.nuxt/client.js
@ multi eventsource-polyfill webpack-hot-middleware/client?reload=true&timeout=30000&ansiColors=&overlayStyles=&name=client&path=/__webpack_hmr/client ./.nuxt/client.js
やったこと
nuxt-config.js -> nuxt-config.tsへリネーム
nuxt-config.tsに以下を追記
参考記事
https://ja.nuxtjs.org/guide/typescript
https://github.com/nuxt-community/nuxt-property-decorator