Skip to content

v0.1.0-alpha.2

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 09 Nov 12:40
· 42 commits to main since this release
Immutable release. Only release title and notes can be modified.
v0.1.0-alpha.2
2697bc1

Every npm package and the crate are now listed, with the binaries, in the signed SHA256SUMS of the release, and the npm and
crates jobs of the workflow stop unless what they publish matches it; tools/approve-release.mjs makes the same check before the
owner approves (docs/RELEASING.md, docs/verifying.md).

Added

  • --dts and --dts-dir work with TypeScript 7, which has no JavaScript API: its command line writes the declarations. --dts-bundle
    still needs TypeScript 5 or 6 and says so.
  • The browser checks of the repository (the development server and --hmr with React, Vue and Svelte, and module federation) run in Firefox and
    WebKit as well as Chromium (BROWSER=firefox or webkit); the three are driven with no dependency of ours and are run in CI on Ubuntu 24.04.
  • Less, Sass (sass-embedded or sass) and Stylus files are compiled when the compiler is installed in the project, as Vite does,
    and read as style sheets (including .module.scss). This applies to builds that use a configuration file, since the
    compilers run in the plugin host; a project that lists its own plugin for one of these languages keeps it.

Fixed

  • Watch mode finds a file that changed while the build that first saw it was running.
  • The self-signed certificate of the HTTPS dev server has a serial number that is a valid DER integer.
  • On Windows, a path is written as a file URL with --original-paths, a name that starts with a slash stays rooted, and the
    in-memory modules of a build, the metafile and module federation compare paths without the platform's separators.
  • In a page build, the dev server and --platform-browser, process.env.NODE_ENV is a constant (production for a build, development
    for the server, or the environment's NODE_ENV; --define wins), as in Vite. Those outputs also no longer start with
    import ... from "node:module" or "node:url" (the require and __dirname shims), which a browser cannot load and which
    stopped every chunk of a page that had any CommonJS code in it.
  • In a page build, a Node built-in (crypto, fs, node:path, ...) that no plugin supplies is an empty module, as in Vite, so a library that
    reaches for crypto when it is there no longer leaves import "crypto" in a script a browser cannot load. A program for Node keeps the import.
  • In a page build (and --platform-browser), the browser condition of exports, the browser field as an entry, and the object form of
    a package's browser field ("./lib/node.js": "./lib/web.js", "fs": false) are followed, as in Vite; axios and many other packages need it
    to keep their Node code out of a page.
  • When the build is split into chunks, a member read through a namespace import (import * as N from "pkg"; N.make()) whose declaration is
    behind files of re-exports (export * from) is kept; it was left out of every chunk (naive-ui's createDiscreteApi).
  • Code written without semicolons: a name that the bundle writes as (0, x.y) or (x) (a CommonJS import) no longer joins the line before it
    as a call (const a = f() followed by a line useEffect(...) became f()(0, ...)); the ; the author left out is written.
  • A dynamic import with a variable may start with an alias (import(\@/layouts/${name}/index.vue`), as Vue's defineAsyncComponent is usually written), and the variable may be in the name of a folder (${name}/index.vue`), not only in the last name; the extension must still be written out.
  • A build driven by a webpack.config.* or rspack.config.* names the chunk of the default entry main.js, as webpack and Rspack do, not
    bundle.js, so a page template that says <script src="./main.js"> finds it.
  • Rspack's HtmlRspackPlugin (from @rspack/core) works: the compiler takes Rspack's built-in plugins through __internal__registerBuiltinPlugin,
    and writes the page (the template with <%= htmlWebpackPlugin.options.title %>, meta, base, inject, scriptLoading, filename) with a
    <script> and <link> for each initial chunk. Another built-in plugin is named in a warning.
  • A JSX spread child (<List>{...items}</List>) builds in the automatic runtime (children: [...items]).
  • A decorator on a class field uses the output's names for what it refers to (it kept the source name when the bundler had renamed an
    import, as with Lit's @property).
  • A script may import a file of public/ by its address (import icons from '/icons.svg', which a Vue template with <use href="/icons.svg#a">
    becomes): the project folder is tried, then public/, when no such file is on the disk.
  • import.meta.glob patterns may start with an alias (@/views/**/*.vue), from --alias or the configuration's resolve.alias
    when it maps a name to a path.
  • A configuration file that imports another file without its extension (./config/options, usual in a TypeScript vite.config.ts)
    is bundled first, as Vite does, when Node cannot follow the import.
  • A part of a file that a plugin names by language (Page.vue?vue&type=script&lang.ts) is read as that language, so the
    TypeScript in a Vue <script setup lang="ts"> block builds.
  • A TypeScript function overload signature inside another function is removed from the output (it was left as a
    bodiless function f(obj), a syntax error).
  • In a TypeScript file, export { Draft } from "./x" of a name that module does not export is taken to be a type and left out
    of the output, as tsc and esbuild do, and no longer an error.