Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source map is not included in the package but is referenced by the min file #360

Closed
marcinbot opened this issue Nov 25, 2019 · 4 comments · Fixed by #667
Closed

Source map is not included in the package but is referenced by the min file #360

marcinbot opened this issue Nov 25, 2019 · 4 comments · Fixed by #667
Assignees
Labels
Bug Raises or fixes a bug JavaScript Pull requests that update Javascript code

Comments

@marcinbot
Copy link

marcinbot commented Nov 25, 2019

See https://wordpress.org/support/topic/file-missing-from-plugin-2/ - Safari logs the missing source map as an error to the dev console.

The map files should either be included in this package, or the JS should be compiled without source maps.

@a81j
Copy link

a81j commented Apr 7, 2020

This is still a problem in 2.1.1 and Safari logs are littered with these errors:

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (sv-wc-payment-gateway-payment-form.min.js.map, line 0)

@unfulvio-godaddy unfulvio-godaddy added Bug Raises or fixes a bug JavaScript Pull requests that update Javascript code labels Jul 3, 2023
@jeffpaul
Copy link

We have a downstream extension merchant reporting a console on every page load due to an issue in the sv-wc-payment-gateway-payment-form.min.css.map file. The lack of space after /* seems to be what triggers the error.

Their suggestion to fix this is to change the following:

/*# sourceMappingURL=sv-wc-payment-gateway-payment-form.min.css.map */

to

/* # sourceMappingURL=sv-wc-payment-gateway-payment-form.min.css.map */

Expected Behavior

No console errors coming from the said source map.

Actual Behavior

Following error in console:

.../wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/css/frontend/sv-wc-payment-gateway-payment-form.min.css.map Failed to load resource: the server responded with a status of 404 (Not Found)

Additional Details

See forum thread here.

@jeffpaul
Copy link

See related file location of concern:

/*# sourceMappingURL=sv-wc-payment-gateway-payment-form.min.css.map */

Noting that some of the other min.css files appear to have the same issue with no space before the # character so there might be a couple places to update if that is in fact causing the issue here.

@unfulvio-godaddy
Copy link
Member

unfulvio-godaddy commented Mar 15, 2024

hey there thanks for logging this and apologies for the late reply

I have opened a PR in #667 and updated the build dependencies including grunt-contrib-sass hoping it would fix the issue or provide a config option to address it, but turns out there's no output change. I have manually edited the css files with the sourcemap ref but obviously this isn't a long term solution.

In the meantime I have also opened an issue in gruntjs/grunt-contrib-sass#283 hoping that the package would address this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Raises or fixes a bug JavaScript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants