#47870 closed defect (bug) (fixed)
Unable to load source maps from webpack in Firefox
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 5.3 | Priority: | normal |
| Severity: | normal | Version: | 5.3 |
| Component: | Build/Test Tools | Keywords: | has-patch dev-feedback commit |
| Focuses: | javascript | Cc: |
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
@
6 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?
I have tested this patch and Firefox still report the same error. Am I doing something wrong @pierlo ?