Repository navigation
v0.1.0-alpha.0
Pre-release
Pre-release
·
131 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
First release.
The registries only accept trusted publishing from a package that already exists, so the npm packages and the crate of this
first version were published by hand, without provenance. Their files are the ones attached to this release: compare them
with SHA256SUMS as docs/verifying.md describes. Every later release is published by the release workflow, with provenance.
Added
- A bundler for JavaScript, TypeScript, JSX, JSON and CSS with no dependencies (not even crates):
module graph, linking, tree shaking, code splitting, minifying, source maps, defines, loaders
(text, base64, data URL, binary, file, empty, CSS and local CSS) and?raw,?urland?inline
import suffixes. - Plugins: Rollup and Vite plugins, esbuild plugins, webpack loaders and compiler plugins, and
Parcel plugins, run by a Node 24 or later process. What is covered by tests is listed in the README. - Module federation: containers, remotes, shared packages, the manifest, generated and consumed
types, runtime plugins and development servers, compatible with the containers rspack and
Vite build (tested in Chromium). --watchandserve(a development server with live reload). Stopping--watchcleanly with Ctrl-C is tested on
Linux and macOS only.- Release files: one tarball per platform,
SHA256SUMS, an SBOM that lists zero components, and
Sigstore signatures. The binaries are not signed with an operating-system key; see
docs/verifying.md. - The command is
rkp.rkp --version. - Pages:
rkp bundle index.html --outdir distbuilds the module scripts and linked style sheets a page names, copies the
images and media it names andpublic/, rewrites the page, and runs plugins'transformIndexHtmlon it (ES modules, or
one file with--format iife). --banner,--footer,--drop:console,--drop:debugger,--packages=external,--resolve-extensions,
--preserve-symlinks,--pure,--metafile,--entry-names,--chunk-names,--out-extension,--legal-comments,--inject,--jsx-dev,--tsconfig-raw; an unknown option is an error.- Module federation:
getPublicPath,dtsoutputDir,generateAPITypes,additionalFilesToCompile,abortOnError,timeout,maxRetries,remoteTypeUrlsanddev.disableLiveReload/disableHotTypesReloadare used; what is not carried out is named in a warning. - Module federation:
compilerInstance,extractThirdParty,extractRemoteTypes,afterGenerate,family,remoteTypesFolder,consumeAPITypes,runtimePkgsand the routerbridgeare carried out; onlydts.implementationis named in a warning. --target: object rest is rewritten wherever it is (nested in other patterns, after computed keys, in assignments andcatch); a return on an async generator suspended inyield*ends it; an async arrow with a rewritten body (??,?.) no longer gets its wrapper twice.--targettakes engines with versions (chrome80,safari13.1,node18,firefox78,ios14.5,edge90,opera70), alone or with years in a comma-separated list; only what one of them lacks is rewritten. Class fields, private members and static blocks are rewritten together when an engine lacks any of them.--target: top-level await is rewritten for targets that lack it when the program is one file with nothing exported (the whole program becomes an async function, or a generator run by__asyncbelow es2017).- JS API:
pluginstakes plugin objects (their hooks run in the calling process, across a local socket;emitFile,parse,getModuleInfoand the other context methods that answer at once work, andconfigureServergets middlewares andws.send) and{ module }descriptors. rkp serve --https(with--https-certand--https-key, or a self-signed certificate it makes and keeps): TLS (HTTP/2, or HTTP/1.1 for clients that ask for it) through a Node.js proxy in front of the dev server.rkp serve --hmr: changed modules are replaced in the open page (import.meta.hot.accept,dispose,data,decline,invalidate), with the page reloading only when a change reaches an entry nothing accepts; top-level await and decorators work, and React Fast Refresh keeps the state of components (whenreact-refreshis installed).- Plugins: Vue (
@vitejs/plugin-vue) and Svelte 5 (@sveltejs/vite-plugin-svelte) work, including under--hmr; hooks written as objects with ahandler,configEnvironment, theservecommand, andlang.<ext>queries (?vue&type=style&lang.css) are understood. - A normal bundle no longer breaks when a module declares a top-level name the helpers use (lodash-es declares
Symbol). - Tested in headless Chromium only: the development server,
--hmrand federation have not been tried in Firefox or Safari. - The development server (and the HTTPS proxy) answers on both loopback addresses when the host is
localhost; before, it listened on the first addresslocalhostresolved to, sohttp://127.0.0.1:PORTwas refused on machines where that is::1. - A hook of a plugin object that calls a blocking context method (
emitFile,parse,getModuleInfo, ...) could wait forever on a machine with few cores; the answer is now awaited without that race. - JSX: a space between two elements on one line (
<a/> <b/>) is kept, as Babel and esbuild keep it. --dts-bundle: one merged.d.tsfor each entry instead of one for each source file.--dtsand--dts-dir: declaration files for the entries, written with the project'stypescript(JS APIdts,dtsDir).--target=es2015toes2025:**,?.,??, logical assignment, numeric separators, optionalcatchand trailing commas
and object spread and rest (in declarations, parameters andfor of), class fields, private members and static blocks are
async functions (below es2017),for awaitand async generators (below es2018) are rewritten for targets that lack them; what cannot be rewritten stops the build and is named.import.meta.envwithMODE,DEV,PROD,SSR,BASE_URLand theVITE_variables of.envfiles (--mode,--env-dir,
--env-prefix,--no-env-files).- Dynamic imports with a variable in the path (
import(./locales/${name}.js)), with the rules of Rollup's plugin for them. ./a.wasm?initinstantiates a WebAssembly module (a function, as Vite's).import.meta.glob, and workers (new Worker(new URL(...)),?worker,?sharedworker, with&inlineand&url).- Builds for linux (x64 and arm64, glibc and musl), macOS (arm64 and x64) and Windows (x64). The unit tests that use fake
Unix paths run on Unix only; each release build bundles and runs a program with the binary it made. - A JavaScript API in
@rathkit/pack:build(options),serve(options),run(args), with types. - npm packages:
@rathkit/pack(a launcher) and one package per platform, published with provenance on thenexttag.