Image component as a standalone package#2111
Draft
atilafassina wants to merge 11 commits intofeat-imagefrom
Draft
Image component as a standalone package#2111atilafassina wants to merge 11 commits intofeat-imagefrom
atilafassina wants to merge 11 commits intofeat-imagefrom
Conversation
|
fixture-image app and setup standalone component
commit: |
Configure tsdown to output preserved JSX via Rolldown's jsx: "preserve" option. Update package.json exports to use solid/default conditions pointing to dist/index.jsx. Add CSS copy step to build script. Co-authored-by: Isaac
Add Vitest config and 16 tests across two suites: - transformer.test.ts: createImageVariants, mergeImageVariantsByType, mergeImageVariantsToSrcSet (7 tests) - components.test.tsx: createLazyRender, createClientSignal, ClientOnly, StartImage SSR regression (9 tests) Co-authored-by: Isaac
Change external from literal "*.css" to regex /\.css$/ so Rolldown actually matches the import "./styles.css" and preserves it in the output instead of extracting it to a separate file. Without this, the component's positioning CSS never loads and the image is clipped to zero height by overflow:hidden. Co-authored-by: Isaac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces @solidjs/image, a new standalone package for image optimization in SolidStart applications. The image component is extracted from the core @solidjs/start package to allow for better modularity and independent versioning.
Changes
features moved to a standalone package
@solidjs/imagesharp<Image>component with support for:sharp(^0.34.5) is a dependency of this package@solidjs/startchanges in relation tofeat-imagebranchTest & Fixture Apps
apps/fixtures/image- demo applicationapps/testsfor local and remote scenarios