weixin_39747383
weixin_39747383
2021-01-11 20:07

Debugging Nativescript-Vue

What problem does this feature solve?

I'm trying to debug my NativeScript-Vue app in Chrome by running npm run debug, opening the chrome devtools link that was provided, and hitting the 'Sources' Tab. However, all I can see is a bundled and minified app.js file. Is there a possibility to view the original Vue component files? It seems that there are no sourcemaps? Is there another way to debug my Nativescript-Vue app?

I used this command to set up my project: > vue init nativescript-vue/vue-cli-template

What does the proposed API look like?

An easy to use and straightforward debug feature.

该提问来源于开源项目:nativescript-vue/nativescript-vue

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

4条回答

  • weixin_39778582 weixin_39778582 4月前

    You can easily comment the following lines in the webpack.config.js file:

    
          new webpack.optimize.UglifyJsPlugin({
            compress: {warnings: false},
            output: {comments: false},
          }),
    

    BTW, I think you are right and the npm run debug command should disable code uglifying by default.

    点赞 评论 复制链接分享
  • weixin_39778582 weixin_39778582 4月前

    See https://github.com/nativescript-vue/vue-cli-template/issues/62

    点赞 评论 复制链接分享
  • weixin_39778582 weixin_39778582 4月前

    PR ready for review: https://github.com/nativescript-vue/vue-cli-template/pull/63

    点赞 评论 复制链接分享
  • weixin_39700215 weixin_39700215 4月前

    We are locking this issue because it has been closed for more than 14 days.

    If the issue comes up again please open a new issue with additional details.

    点赞 评论 复制链接分享

相关推荐