ports/www/rubygem-jsbundling-rails-rails71/Makefile
Po-Chuan Hsieh a7ba0c40b5
www/rubygem-jsbundling-rails-rails71: Add rubygem-jsbundling-rails-rails71 1.3.1
Import maps let you import JavaScript modules using logical names that map to
versioned/digested files -- directly from the browser. So you can build modern
JavaScript applications using JavaScript libraries made for ESM without the need
for transpiling or bundling.This frees you from needing Webpack, Yarn, npm, or
any other part of the JavaScript toolchain. All you need is the asset pipeline
that's already included in Rails.

With this approach you'll ship many small JavaScript files instead of one big
JavaScript file. Thanks to HTTP/2 that no longer carries a material performance
penalty during the initial transport, and in fact offers substantial benefits
over the long run due to better caching dynamics. Whereas before any change to
any JavaScript file included in your big bundle would invalidate the cache for
the the whole bundle, now only the cache for that single file is invalidated.

There's native support for import maps in Chrome/Edge 89+, and a shim available
for any browser with basic ESM support. So your app will be able to work with
all the evergreen browsers.
2024-09-18 14:13:06 +08:00

20 lines
442 B
Makefile

PORTNAME= jsbundling-rails
PORTVERSION= 1.3.1
CATEGORIES= www rubygems
MASTER_SITES= RG
PKGNAMESUFFIX= -rails71
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Bundle and transpile JavaScript in Rails with esbuild, rollup.js, or Webpack
WWW= https://github.com/rails/jsbundling-rails
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/MIT-LICENSE
RUN_DEPENDS= rubygem-railties71>=6.0.0:www/rubygem-railties71
USES= gem
NO_ARCH= yes
.include <bsd.port.mk>