最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

javascript - What method does webpack use to show the sources in a 'webpack:' folder in dev tools? - Stack Overf

matteradmin7PV0评论

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
Add a ment  | 

1 Answer 1

Reset to default 5 +25

The 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.

Post a comment

comment list (0)

  1. No comments so far