打赏

vue 源码 断点调试

1、添加sourceMap

sourceMap: true

 

2、npm run dev 会生成vue.js.map

3、断点调试

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>vue源码测试</title>
    </head>
    <body>
        <div id="app">
            <div v-for="item in list">
                {{ item }}
            </div>
        </div>

        <script src="./vue.js"></script>
        <script type="text/javascript">
            var app = new Vue({
                el: '#app',
                data: {
                    list: [1, 2, 3]
                }
            })
        </script>

    </body>
</html>

 

posted @ 2018-11-20 19:39  孟繁贵  阅读(5482)  评论(0编辑  收藏  举报
TOP