vue-cli 3.5 解决 typescript cannot find file 问题。

版本:

"ts-loader": "^3.5.0",
"typescript": "^3.3.4000",
"vue-template-compiler": "^2.5.2",
"webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-server": "^2.9.1",
"webpack-merge": "^4.1.0"

切记,注意红色版本号!!

{
     test: /\.vue$/,
     loader: 'vue-loader',
     options: {
         loaders: {
              ts:  [
                        {
                            loader: 'ts-loader',
                            options: {
                                appendTsSuffixTo: [/\.vue$/]
                            }
              }]
         },
         options: {
              esModule: true
         }
     }
}

  

转载于:https://www.cnblogs.com/whm-blog/p/10624887.html

你可能感兴趣的:(vue-cli 3.5 解决 typescript cannot find file 问题。)