during debugging, meteor glues all js files into one app.js. There were no such problems before. How to disable this file merging. Unable to debug
I use import, when debugging in the browser, all js files are glued into one
i use webstorm. until today everything worked fine, all files were available in the browser, now they are merged into one. I donβt understand why this was done and why they began to unite
Meteor creates a source map so the dev tools can show the original files instead. Maybe javascript source maps are disabled in the dev tools?
If you are running the app with the --production
option, then there might not be any source maps. The default minifier does not create source maps, but you can replace it with a package like zodern:standard-minifier-js that does.
Another possibility is the files were previously dynamically imported instead of being part of the main client bundle. Even if source maps are disabled, dynamically imported files are shown separately in the dev tools.
program arguments:
βinspect --settings settings.json --port=3001
Webstorm (file group-msg.js):
Chrome:
all ui files merged into 1 file app.js
In the sidebar, there is a folder with the laptop icon that says app
. This has all of the original files
If you set up your Filesystem options in Chrome dev tools, you can even edit the files right in the Chrome Source tab and save them. Meteor will automatically rebuild and re-launch. If youβre using Meteor HMR it will rebuild/relaunch very quickly.
looked through all the files, nothing. And the output from the console comes from app.js
put a debugger;
statement into your client-side code and run it in Chrome. The Chrome debugger will stop there and then you can access the file that Chrome has debugger access to. You can probably put breakpoints in that file that will work.
can you explain how to turn off merging files into one in meteor?
What is your goal in seeking to do that?
I want to debug the code, I want to see the files in chrome as they are in my webstorm, and not glued into a single file of 24,000 lines and with changed code
Very good. The solution you are seeking is unrelated to the goal you are trying to achieve.
Meteor is supposed to build your app into a single file. This is unrelated to your goal of editing/debugging your source code as individual files.
The way to achieve your goal of editing/debugging your source code as individual files is to use Chromeβs Filesystem and Source Map features, which will use the Source Maps generated by Meteor.
I use WebStorm too.