【Vue】vueプロジェクトはtypescriptが遭遇したいくつかのピットに再構築されます

796 ワード

さまざまなチュートリアルに従って操作すると、小さな問題がたくさん発生します.
Appを書き換えている場合.vueの時、
エラー:
client?7d67:159 ./src/App.vue
Module Error (from ./node_modules/[email protected]@eslint-loader/index.js):
]50;CurrentDir=/Users/chenjing/Desktop/pro/new-bull-web
  ✘  http://eslint.org/docs/rules/  Parsing error: Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.

ヒントexport Appの仕方が間違っているので、ヒントに従って以下に変更すればいいです.
class App extends Vue {

}
export default App;

また、script言語をlang='ts'に変更すると、tsのデフォルトファイルの接尾辞がtsであるため、コンポーネントを参照する際に接尾辞を付けるvueのcomponentが見つからないことを示す.vue
eslintの構成が追加されている場合は、webpackに注意してください.base.conf.jsにtsの識別を加える、さもなくば参照するrouteまたはstoreのindexに対して.tsは認識できない
 
未完待機