Registry / devops / asto
library0.0.34jsnpmunverified

Asto is a minimalist JavaScript and TypeScript package bundler designed for small bundle sizes, claiming to be only 9kb. As of version `0.1.0`, it provides core bundling capabilities with built-in TypeScript support and an extendable loader architecture. It defaults to using `esbuild` for performance but also offers an optional Webpack loader for scenarios requiring more advanced or stable bundling features typically associated with Webpack. The package is currently in its very early stages of development, indicated by its `0.1.0` version, suggesting an active but potentially rapidly evolving API and feature set. Its primary differentiation lies in its small footprint and focus on simplicity, making it a lightweight alternative for projects that don't require the full complexity of larger bundlers. Release cadence is currently irregular given its early stage.

npm install asto
INSTALL
IMPORT
SIG · ASTO
A
asto
devopsjavascriptv0.0.34
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

asto
import { asto } from 'asto'
const { asto } = require('asto')
While README examples use CommonJS `require`, modern TypeScript/ESM projects should prefer named ES module imports. Asto ships with TypeScript types.
watch
import { watch } from 'asto'
const { watch } = require('asto')
The `watch` function for rebuilding on file changes also supports ES module imports.
webpackLoader
import { webpackLoader } from '@asto/webpack'
const { webpackLoader } = require('@asto/webpack')
This utility from the optional `@asto/webpack` integration package supports ES module imports. Remember to install `@asto/webpack` and `webpack`.

Demonstrates how to configure Asto with the optional Webpack loader for TypeScript projects, bundling multiple entry points and handling assets with specified Webpack options.

import { asto } from 'asto'; import { webpackLoader } from '@asto/webpack'; // Install @asto/webpack and webpack first: npm i -D @asto/webpack webpack asto({ loader: webpackLoader( { typescript: true, // Enable TypeScript processing nodeExternals: true, // Exclude node_modules from the bundle }, { // Additional webpack options can go here, e.g., output configuration output: { filename: '[name].js', path: new URL('./dist', import.meta.url).pathname, }, } ), entryPoints: [ 'src/index.ts', // Your primary application entry point { input: 'assets/image.png', output: 'dist/assets/image.png', builder: 'asset', }, ], }).then(() => { console.log('Asto bundling complete with Webpack loader.'); }).catch(err => { console.error('Asto bundling failed:', err); });
asto --version
Debug
Known issues
breakingAsto is currently in its very early stages (v0.1.0), meaning API surfaces are highly unstable and subject to frequent, breaking changes without adherence to SemVer major version bumps. Users should anticipate rapid evolution.
fix
Pin Asto package versions exactly in your `package.json` (e.g., `'asto': '0.1.0'`) and review changelogs or GitHub commits carefully with each update. Consider delaying adoption for production systems requiring high stability.
affects: >=0.1.0
gotchaThe default configuration for Asto uses `esbuild` internally. When switching to the optional Webpack loader, ensure you understand Webpack's configuration nuances, especially regarding TypeScript and external modules.
fix
Refer to Webpack's official documentation for advanced loader and plugin configurations. The `@asto/webpack` package provides a wrapper, but core Webpack knowledge is essential for complex setups.
affects: >=0.1.0
Errors
Common errors & fixes
Cannot find module '@asto/webpack' or 'webpack'
The optional Webpack loader integration or Webpack itself has not been installed.
fix
Install the necessary packages as development dependencies: `npm install --save-dev @asto/webpack webpack`
TypeError: asto is not a function (or similar module loading error)
Attempting to use CommonJS `require()` syntax in an ES Module (ESM) context, or vice-versa, or incorrect named import.
fix
Ensure your project's module system (CommonJS or ES Modules) aligns with how you import `asto`. For ES Modules, use `import { asto } from "asto"`. If using CommonJS, `const { asto } = require('asto')` should be correct.
Upgrade
Version history
0.0.34latest on npm
Audit
Dependencies
@asto/webpackoptionalOptional loader for integrating with Webpack for bundling. Typically installed as a dev dependency.
webpackoptionalRequired by @asto/webpack when using the Webpack loader. Typically installed as a dev dependency.
Agent activity
14 hits · last 30 days
node
10
OpenAI (training)
1
Resources