T
T
toha_man2019-06-29 13:37:56
JavaScript
toha_man, 2019-06-29 13:37:56

What is the correct way to track errors before building browserify?

In my project, I use gulp browserify to get a modular build of js files. I use uglify and sourcemaps to generate minified code and source maps (but this is just for information, this stage does not affect the main problem in any way).
task browserify generates a common bundle.js file, which, as you know, includes all the js files of the project. If a mistake is made in the code, then at the runtime in the browser I see an error with a line number in this huge bundle.js.
Is it possible to somehow make the error output in a source file that has not yet been compiled into bundle.js ?
Change the whole assembly principle - i.e. at the development stage, assemble the project without modularity, and then at the production stage already assemble it into a bundle - the solution is so-so, there will be more problems and questions.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question