question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Source maps specified in index.js but not included in blade

See original GitHub issue

Description

The dist js files specify a sourceMappingUrl, but since no source maps are included in blade it results in a developer console error, 404 for index.js.map.

Proposed solution

Either completely skip source map in the build, or include them as part of the @routes directive (but then - should they be included in production or not?). Perhaps users could import the js using their build tool (leaving source map generation up to them), while using blade only for the JSON routes.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
bakerkretzmarcommented, Dec 18, 2020

My PR to add support for inline sourcemaps was just merged into microbundle, so as soon as they tag a release this should be trivial to add. Thanks for your patience.

Note to future me: in production just strip out the sourcemap line entirely to avoid error messages.

0reactions
bakerkretzmarcommented, Feb 5, 2021

@graceoflives just released v1.0.5 👍🏻

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error laravel project with a blade SourceMap - Stack Overflow
my JavaScript files are called normally in blade with: {{URL::asset('assets/js/html2canvas.js')}}. The default view of laravel has no errors ...
Read more >
4 Reasons Why Your Source Maps are Broken - Sentry Blog
4 Reasons Why Your Source Maps are Broken · Missing or incorrect source map directive · Missing original source files · Bad source...
Read more >
Compiling Assets (Mix) - The PHP Framework For Web Artisans
Source Maps. Though disabled by default, source maps may be activated by calling the mix.sourceMaps() method in your webpack.mix.js ...
Read more >
Using template engines with Express
js library follows this convention by mapping all of the popular Node.js template engines, and therefore works seamlessly within Express. After the view...
Read more >
Development | webpack
For this guide, let's use the inline-source-map option, which is good for illustrative purposes (though not for production):. webpack.config.js
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found