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

Fixed relative URLs from becoming absolute during build #1354

Merged
merged 1 commit into from Jul 22, 2021
Merged

Fixed relative URLs from becoming absolute during build #1354

merged 1 commit into from Jul 22, 2021

Conversation

esulu
Copy link
Contributor

@esulu esulu commented Jul 21, 2021

This PR addresses the generated absolute image URLs mentioned in #675. The gulp-concat-css build would previously convert the paths in the dist folder to be relative. However, disabling the rebaseUrls option (which defaults to true) will prevent the URLs from being changed (gulp-concat-css API).

Additionally, gulp-clean-css would still rebase the URLs with the above change, so a similar option had to disabled there too for relative URLs in the .min.css file (gulp-clean-css options).

Example of a relative URL in the dist/jsoneditor.css file:

.jsoneditor-contextmenu .jsoneditor-menu li button .jsoneditor-expand {
  position: absolute;
  top: 0;
  right: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  margin: 0 4px 0 0;
  background-image: url("./img/jsoneditor-icons.svg");
  background-position: 0 -72px;
}

If there is anything else I should add please let me know!

@josdejong
Copy link
Owner

Thanks a lot for figuring out a fix for the absolute urls Eren, this issue has been open for a long time!

@josdejong josdejong merged commit 6112cab into josdejong:develop Jul 22, 2021
@josdejong
Copy link
Owner

josdejong commented Jul 22, 2021

Fix is published now in v9.5.2, thanks again 👍

@esulu
Copy link
Contributor Author

esulu commented Jul 22, 2021

Wonderful! Glad to have contributed :)

andyquinterom pushed a commit to proyais/jsoneditor that referenced this pull request Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants