neugelb / sidepix Goto Github PK
View Code? Open in Web Editor NEW<picture> component with image processing as side-effect
<picture> component with image processing as side-effect
Hi,
Sorry looks like next image and sidepix does the same thing, or even that sidepix has more features than next-image. Which begs the question as to why there is a compatibility layer between sidepix and next-image. Why would we use both together, whats missing from either package to warrant the use of both?
Great work though, lovely package.
Bests,
Sean.
Hey, thanks for this awesome library.
There's one little bug in the Picture component, it basically looses the className
property due to a mistake in the makeGetPictureData
which doesn't return the received className
.
This way toPictureElementProps
won't be able to pass the className
to the picture
node.
Testing out the nextjs
example, the static export doesn't work properly: the public/media
folder is empty.
yarn
yarn build
examples/nextjs
yarn
yarn export
yarn export
yarn run v1.22.19
$ yarn clean && yarn build && next export
$ shx rm -rf .next image-cache/* public/media/* conf server.js out
$ yarn build-conf && yarn build-custom-server && next build && sidepix-wait
$ tsc --skipLibCheck src/components/PictureConf.ts --outDir conf
$ tsc server.ts --esModuleInterop true --outDir .
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
info - Checking validity of types
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
info - Creating an optimized production build
info - Compiled successfully
info - Collecting page data
info - Generating static pages (4/4)
sidepix - connected to default
sidepix - connected to default
info - Finalizing page optimization
Page Size First Load JS
┌ ○ / 2 kB 171 kB
├ /_app 0 B 75 kB
├ ○ /404 193 B 75.2 kB
└ ○ /next-image 6.4 kB 176 kB
+ First Load JS shared by all 75 kB
├ chunks/framework-1f10003e17636e37.js 45 kB
├ chunks/main-35f06ba0f7da9325.js 28.7 kB
├ chunks/pages/_app-714b785c29b56780.js 494 B
├ chunks/webpack-cb7634a8b6194820.js 884 B
└ css/27d177a30947857b.css 194 B
○ (Static) automatically rendered as static HTML (uses no initial props)
sidepix - connected to default
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
info - using build directory: /home/xyz/sidepix/examples/nextjs/.next
info - Copying "static build" directory
info - No "exportPathMap" found in "/home/xyz/sidepix/examples/nextjs/next.config.js". Generating map from "./pages"
info - Launching 3 workers
info - Copying "public" directory
info - Exporting (3/3)
Export successful. Files written to /home/xyz/sidepix/examples/nextjs/out
Done in 27.43s.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.