Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Metronic v8.0.37 Sourcemaps not working as Expected


Hi,

We are facing issue with jsSourcemaps in gulp.config.js following are the settings:

{
"config": {
"debug": true,
"compile": {
"jsMinify": true,
"cssMinify": true,
"jsSourcemaps": true,
"cssSourcemaps": true
},
"dist": [
"../../../public/redc-admin-ui/assets"
]
}
}

cssSourcemaps just working fine and chromes dev tool showing and debugging actual SCSS file and line number.

But the issue is with jsSourcemaps this settings create external source map files which showing in last comment of scripts.bundle.js like //# sourceMappingURL=scripts.bundle.js.map and I have verified that source map file also exists. But Chrome dev tool showing error 'Uncaught ReferenceError: SmoothScroll is not defined in scripts.bundle.js:6760 where as actual error is inside demo1/src/js/layout/app.js line number 417

I'm confused why chrome inspect showing scripts.bundle.js it should show actual file app.js and the line number.

Kindly let me know if I'm missing something or guide me in right direction.


Thanks!
Faisal Rehman


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (2)


Make sure your system is set up properly (development vs. production). There are times when source maps can only be used in testing mode brainrot clicker. Make sure you look over your setup files and environment factors.



Hi Faisal,

Probably, this is a Chrome issue. Please verify that your Chrome browser can read the source map files. Please check the link below to set up.



Thanks


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(