#47870 closed defect (bug) (fixed)
Unable to load source maps from webpack in Firefox
| Reported by: | pierlo | Owned by: | adamsilverstein |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.3 |
| Component: | Build/Test Tools | Version: | 5.3 |
| Severity: | normal | Keywords: | has-patch dev-feedback commit |
| Cc: | Focuses: | javascript |
Description
By default, Webpack uses output.library as the namespace for module source maps, which generates the URL webpack://wp.[name]/<path of module>. This loads fine in Chrome, but in Firefox it throws an error similar to:
Source map error: TypeError: Invalid URL: webpack://wp.[name]/webpack/bootstrap
Resource URL: http://localhost:8888/wp-content/plugins/gutenberg/build/components/index.js?ver=1565639281
Source Map URL: index.js.map
The solution to this is to specify a devtoolNamespace.
So for example, setting devtoolNamespaceto wp would result in the URL webpack://wp/<path of module> (which the attached patch does).
Attachments (1)
Change History (10)
#3
in reply to: ↑ 2
@
7 years ago
Replying to andraganescu:
I have tested this patch and Firefox still report the same error. Am I doing something wrong @pierlo ?
It still works on the latest version of trunk. Maybe you have cache issues?
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I have tested this patch and Firefox still report the same error. Am I doing something wrong @pierlo ?