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

feature/issue 1199 url references in CSS bundling #1211

Merged

Conversation

thescientist13
Copy link
Member

@thescientist13 thescientist13 commented Mar 15, 2024

Related Issue

resolves #1199

Summary of Changes

  1. Support bundling url references in CSS files with hashed filenames
  2. Add test cases
  3. Update Styles and Assets docs

TODO

  1. inline <style> scratch dir assets handling and test case
  2. basePath support
  3. bundle / hash filenames
  4. docs
  5. clean up console logs / refactoring

Questions

  1. Is our resolution algorithm too naive to map back url references to assuming the root of the user's workspace when dealing with relative paths, e.g. ../? - I think it's fine for now, if it breaks later on a particular use case, we can improve it then with a clear reproduction
  2. to the above point, what about if using CSS Modules, e.g. with { type: 'css' } - tracking in apply CSS optimizations and bundling to CSS (in) modules #1227
  3. rename assets/ to public/ for general asset copying (could lead to duplicate copies) - align assets and build output directory naming conventions #1219
    • would mean changing default greenwood config output build directory name

@thescientist13 thescientist13 added documentation Greenwood specific docs CLI feature New feature or request labels Mar 15, 2024
@thescientist13 thescientist13 self-assigned this Mar 15, 2024
@thescientist13 thescientist13 added the question Further information is requested label Mar 15, 2024
@thescientist13 thescientist13 changed the title Feature/issue 1199 css url asset bundling Feature/issue 1199 url references in CSS bundling Mar 16, 2024
@thescientist13 thescientist13 marked this pull request as ready for review March 16, 2024 16:30
@thescientist13 thescientist13 changed the title Feature/issue 1199 url references in CSS bundling feature/issue 1199 url references in CSS bundling May 4, 2024
@thescientist13 thescientist13 force-pushed the feature/issue-1199-CSS-url-asset-bundling branch from b4ca9bd to ac17ae1 Compare May 4, 2024 22:21
@thescientist13 thescientist13 merged commit c2360ab into release/0.30.0 May 4, 2024
8 checks passed
@thescientist13 thescientist13 deleted the feature/issue-1199-CSS-url-asset-bundling branch May 4, 2024 22:37
thescientist13 added a commit that referenced this pull request Jun 1, 2024
* bundling of URL referenced assets in CSS files

* add test cases for CSS url reference bundling

* normalize file paths for windows

* base path support

* hashing of bundled CSS filenames

* document CSS bundling behaviors

* filename hashing

* refactoring and console log cleanup
thescientist13 added a commit that referenced this pull request Nov 2, 2024
* bundling of URL referenced assets in CSS files

* add test cases for CSS url reference bundling

* normalize file paths for windows

* base path support

* hashing of bundled CSS filenames

* document CSS bundling behaviors

* filename hashing

* refactoring and console log cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI documentation Greenwood specific docs feature New feature or request question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support bundling of url properties (like for @font-face + src) during CSS file optimization
1 participant