Get 2024 Templates Mega Bundle!$1000 worth of 19 Bootstrap HTML, Vue & React Templates + 3 Vector Sets for just $99
Get for 99$

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
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (1)


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.

https://stackoverflow.com/a/60274056

Thanks


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(