
Now let's make sure we have something to debug, so let's create an error in our print. Be sure to check them out so you can configure them to your needs.įor this guide, let's use the inline-source-map option, which is good for illustrative purposes (though not for production): There are a lot of different options available when it comes to source maps. Right click on a tab and select Compare with Right click somewhere in the active view and select Compare with Right click on a tab and select Compare. The Solution to Comparing the contents of two files in Sublime Text is Navigate to the folder containing them through Open Folder.

If an error originates from b.js, the source map will tell you exactly that.
Sublime text compare files code#
In order to make it easier to track down errors and warnings, JavaScript offers source maps, which map your compiled code back to your original source code. Wdiff is the CLI front end of the Diff utility, and it has a different approach for comparing files i.e it scans on a word-per-word basis. This isn't always helpful as you probably want to know exactly which source file the error came from. For example, if you bundle three source files ( a.js, b.js, and c.js) into one bundle ( bundle.js) and one of the source files contains an error, the stack trace will point to bundle.js. When webpack bundles your source code, it can become difficult to track down errors and warnings to their original location. OS X: /Library/Application Support/Sublime Text 3/Packages/ Windows: APPDATA/Sublime Text 3/Packages/ Linux: /. const path = require('path') Ĭonst HtmlWebpackPlugin = require('html-webpack-plugin') Let's start by setting mode to 'development' and title to 'Development'. The tools in this guide are only meant for development, please avoid using them in production! In Sublime Text, you can quickly and easily compare differences between two different files using its built-in Diff Files feature. Before we continue, let's look into setting up a development environment to make our lives a little easier. In addition to the built-in support for Python and a dedicated API, you can leverage multiple handy plugins for editing.
Sublime text compare files free#
Although this IDE is paid, you have the option to try out a free version.

By contrast, Sublime Text rates 4.5/5 stars with 1,654 reviews. Notepad++ rates 4.6/5 stars with 2,199 reviews. It has been compatible with Python since the launch of version 2.0. Sublime Text based on preference data from user reviews. If you've been following the guides, you should have a solid understanding of some of the webpack basics. This cross-platform text editor has superior editing capabilities. This guide extends on code examples found in the Output Management guide.
