admin管理员组文章数量:1025465
If I use webpack in dev mode, when I open chrome dev tools, in the 'sources' tab, I can see a 'webpack://' folder with all my source code.
I would like to know how I could do something similar with my own code (without webpack).
Let's say that I want to program my own build system. This build system takes some source code then transpiles it. How can I show the original source code (including js, html, and css files) in a special folder (for example 'mysource://')?
If I use webpack in dev mode, when I open chrome dev tools, in the 'sources' tab, I can see a 'webpack://' folder with all my source code.
I would like to know how I could do something similar with my own code (without webpack).
Let's say that I want to program my own build system. This build system takes some source code then transpiles it. How can I show the original source code (including js, html, and css files) in a special folder (for example 'mysource://')?
Share Improve this question asked Mar 23, 2019 at 6:28 OliOli 16.1k7 gold badges53 silver badges67 bronze badges 1- please check this post (i can not ment): stackoverflow./questions/27626764/… – user10988894 Commented Mar 25, 2019 at 6:46
1 Answer
Reset to default 5 +25The source code you see in your DevTool-window are so called 'source-maps', in webpack they are generated (in most cases) by the SourceMapDevToolPlugin by default when in 'dev' mode.
Here is another article about how to generate source maps.
If I use webpack in dev mode, when I open chrome dev tools, in the 'sources' tab, I can see a 'webpack://' folder with all my source code.
I would like to know how I could do something similar with my own code (without webpack).
Let's say that I want to program my own build system. This build system takes some source code then transpiles it. How can I show the original source code (including js, html, and css files) in a special folder (for example 'mysource://')?
If I use webpack in dev mode, when I open chrome dev tools, in the 'sources' tab, I can see a 'webpack://' folder with all my source code.
I would like to know how I could do something similar with my own code (without webpack).
Let's say that I want to program my own build system. This build system takes some source code then transpiles it. How can I show the original source code (including js, html, and css files) in a special folder (for example 'mysource://')?
Share Improve this question asked Mar 23, 2019 at 6:28 OliOli 16.1k7 gold badges53 silver badges67 bronze badges 1- please check this post (i can not ment): stackoverflow./questions/27626764/… – user10988894 Commented Mar 25, 2019 at 6:46
1 Answer
Reset to default 5 +25The source code you see in your DevTool-window are so called 'source-maps', in webpack they are generated (in most cases) by the SourceMapDevToolPlugin by default when in 'dev' mode.
Here is another article about how to generate source maps.
本文标签:
版权声明:本文标题:javascript - What method does webpack use to show the sources in a 'webpack:' folder in dev tools? - Stack Overf 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745634607a2160368.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论