{"_id":"@aero-js/config","_rev":"4-28f694af4132d5a0aeabd47b704289e4","name":"@aero-js/config","dist-tags":{"latest":"0.4.0"},"versions":{"0.3.3":{"name":"@aero-js/config","version":"0.3.3","author":{"name":"Jamie Wilson"},"license":"MIT","_id":"@aero-js/config@0.3.3","maintainers":[{"name":"jmwlsn","email":"jamie@jamiewilson.io"}],"homepage":"https://github.com/jamiewilson/aero","bugs":{"url":"https://github.com/jamiewilson/aero/issues"},"dist":{"shasum":"5a216abfa4991ed43b4de02a57f71df31ff098c0","tarball":"https://registry.npmjs.org/@aero-js/config/-/config-0.3.3.tgz","fileCount":5,"integrity":"sha512-Q0LMfKF1uCF5zp3+hIePX2bOKW0pLR1EhnFVxNtsubWvcZbTThwgA2Sh0QBqp4Q0Ruho1AtO1tJ5GGBzlLZ/Mw==","signatures":[{"sig":"MEUCIQCnNZJga/y7B3FB/FDVDusYZ1+eV01S/E95mkFOkRGXkwIgfUQTtK6qrQlu0Wd3M5KpUs8Kbv4x25kEQQLrC7jmE0Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15068},"type":"module","_from":"file:aero-js-config-0.3.3.tgz","exports":{".":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"}},"private":false,"scripts":{"build":"tsdown src/index.ts --format esm --dts --clean --out-dir dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"jmwlsn","email":"jamie@jamiewilson.io"},"_resolved":"/private/var/folders/yc/828p39ws2lxgqcb96h4qdbjm0000gn/T/3349e4666c2e981e3287b1e361fe9399/aero-js-config-0.3.3.tgz","_integrity":"sha512-Q0LMfKF1uCF5zp3+hIePX2bOKW0pLR1EhnFVxNtsubWvcZbTThwgA2Sh0QBqp4Q0Ruho1AtO1tJ5GGBzlLZ/Mw==","repository":{"url":"git+https://github.com/jamiewilson/aero.git","type":"git","directory":"packages/config"},"_npmVersion":"10.9.3","description":"Typed Aero configuration and Vite config factory. Used by `aero.config.ts` and the dev/build entry to produce the final Vite config (Aero plugin, optional content plugin, and user overrides).","directories":{},"_nodeVersion":"22.18.0","dependencies":{"jiti":"^2.4.2","@aero-js/vite":"0.3.3"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.21.0-beta.2","typescript":"^5.9.3","@types/node":"^25.3.0"},"peerDependencies":{"vite":"^8.0.0-0","@aero-js/core":"0.3.3","@aero-js/content":"0.3.3"},"peerDependenciesMeta":{"vite":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/config_0.3.3_1772817355925_0.078969342799047","host":"s3://npm-registry-packages-npm-production"}},"0.3.4":{"name":"@aero-js/config","version":"0.3.4","author":{"name":"Jamie Wilson"},"license":"MIT","_id":"@aero-js/config@0.3.4","maintainers":[{"name":"jmwlsn","email":"jamie@jamiewilson.io"}],"homepage":"https://github.com/jamiewilson/aero","bugs":{"url":"https://github.com/jamiewilson/aero/issues"},"dist":{"shasum":"773ec24ff284e07dc72b19b77540e331a2e31e54","tarball":"https://registry.npmjs.org/@aero-js/config/-/config-0.3.4.tgz","fileCount":5,"integrity":"sha512-PSBejLNqJO7KPX9zCy6ftvnjMaEIlSShMyJjRaRSAhqDUUPoLKtCUyC6xc2r83fDuqFu9+BsPMayxPtjO2Aydg==","signatures":[{"sig":"MEUCIHnyyGWziaEsfMMVwirdrSpCD34p+iBc88ZgVxQODqfdAiEAxpjTYiwH7i/nwL2UThe5NGss8q5G0cfeQp4xx9z275A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15066},"type":"module","_from":"file:aero-js-config-0.3.4.tgz","exports":{".":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"}},"private":false,"scripts":{"build":"tsdown src/index.ts --format esm --dts --clean --out-dir dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"jmwlsn","email":"jamie@jamiewilson.io"},"_resolved":"/private/var/folders/yc/828p39ws2lxgqcb96h4qdbjm0000gn/T/406d3fc6879c7d9514fa9262cb0cff64/aero-js-config-0.3.4.tgz","_integrity":"sha512-PSBejLNqJO7KPX9zCy6ftvnjMaEIlSShMyJjRaRSAhqDUUPoLKtCUyC6xc2r83fDuqFu9+BsPMayxPtjO2Aydg==","repository":{"url":"git+https://github.com/jamiewilson/aero.git","type":"git","directory":"packages/config"},"_npmVersion":"10.9.3","description":"Typed Aero configuration and Vite config factory. Used by `aero.config.ts` and the dev/build entry to produce the final Vite config (Aero plugin, optional content plugin, and user overrides).","directories":{},"_nodeVersion":"22.18.0","dependencies":{"jiti":"^2.4.2","@aero-js/vite":"0.3.4"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.21.0-beta.2","typescript":"^5.9.3","@types/node":"^25.3.0"},"peerDependencies":{"vite":"^8.0.0-0","@aero-js/core":"0.3.4","@aero-js/content":"0.3.4"},"peerDependenciesMeta":{"vite":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/config_0.3.4_1773676834901_0.7487318522750752","host":"s3://npm-registry-packages-npm-production"}},"0.3.5":{"name":"@aero-js/config","version":"0.3.5","author":{"name":"Jamie Wilson"},"license":"MIT","_id":"@aero-js/config@0.3.5","maintainers":[{"name":"jmwlsn","email":"jamie@jamiewilson.io"}],"homepage":"https://github.com/jamiewilson/aero","bugs":{"url":"https://github.com/jamiewilson/aero/issues"},"dist":{"shasum":"283947572a3f9cb800788c57058d5b0af470dab7","tarball":"https://registry.npmjs.org/@aero-js/config/-/config-0.3.5.tgz","fileCount":5,"integrity":"sha512-Kt0uQjPPxg32gPZqfdtDVnel98hQGKq6isZzsS8DldrnZkDi98lZx6jjFnnM3yR7UkUIklQ9XiU8rpWR4GuAkw==","signatures":[{"sig":"MEUCIQDaW4soIQPyIiYku5PTxVJA/XrXXnJaoDd7HwQ9aHIEPgIgBvY8jv3RDYrfoiwzC4+KaJltb5GdjH1+HS+gqzPQ8sY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15108},"type":"module","_from":"file:aero-js-config-0.3.5.tgz","exports":{".":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"}},"private":false,"scripts":{"build":"tsdown src/index.ts --format esm --dts --clean --out-dir dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"jmwlsn","email":"jamie@jamiewilson.io"},"_resolved":"/private/var/folders/yc/828p39ws2lxgqcb96h4qdbjm0000gn/T/b44cfb2ee998fb29a8289d89395f786b/aero-js-config-0.3.5.tgz","_integrity":"sha512-Kt0uQjPPxg32gPZqfdtDVnel98hQGKq6isZzsS8DldrnZkDi98lZx6jjFnnM3yR7UkUIklQ9XiU8rpWR4GuAkw==","repository":{"url":"git+https://github.com/jamiewilson/aero.git","type":"git","directory":"packages/config"},"_npmVersion":"10.9.3","description":"Typed Aero configuration and Vite config factory. Used by `aero.config.ts` and the dev/build entry to produce the final Vite config (Aero plugin, optional content plugin, and user overrides).","directories":{},"_nodeVersion":"22.18.0","dependencies":{"jiti":"^2.4.2","@aero-js/vite":"0.3.5"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.21.0-beta.2","typescript":"^5.9.3","@types/node":"^25.3.0"},"peerDependencies":{"vite":"^8.0.0-0","@aero-js/core":"0.3.5","@aero-js/content":"0.3.5"},"peerDependenciesMeta":{"vite":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/config_0.3.5_1773848989341_0.5274665269967733","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@aero-js/config","version":"0.4.0","private":false,"homepage":"https://github.com/jamiewilson/aero","license":"MIT","author":{"name":"Jamie Wilson"},"repository":{"type":"git","url":"git+https://github.com/jamiewilson/aero.git","directory":"packages/config"},"type":"module","exports":{".":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"./vite":{"types":"./dist/vite.d.mts","default":"./dist/vite.mjs"},"./analyzer-entries":{"types":"./dist/analyzer-entries.d.mts","default":"./dist/analyzer-entries.mjs"}},"dependencies":{"effect":"^3.21.0","jiti":"^2.6.1","@aero-js/core":"0.4.0","@aero-js/vite":"0.4.0"},"devDependencies":{"@types/node":"^25.5.0","tsdown":"^0.21.7","typescript":"^6.0.2"},"peerDependencies":{"vite":"8.0.3","@aero-js/content":"0.4.0","@aero-js/core":"0.4.0"},"peerDependenciesMeta":{"vite":{"optional":true}},"scripts":{"build":"tsdown src/index.ts src/vite.ts src/analyzer-entries.ts --format esm --dts --clean --out-dir dist","typecheck":"tsc --noEmit"},"_id":"@aero-js/config@0.4.0","description":"Typed Aero configuration and Vite config factory. Used by `aero.config.ts` and the dev/build entry to produce the final Vite config (Aero plugin, optional content plugin, and user overrides).","bugs":{"url":"https://github.com/jamiewilson/aero/issues"},"_integrity":"sha512-30U4f7JZXPPShoCS7KZckqg5djsTOPeYUJEf2+1TdZznf/B232eSmKjaMawIfMzVHXAYZnK/lA128nNRDWaq3w==","_resolved":"/private/var/folders/yc/828p39ws2lxgqcb96h4qdbjm0000gn/T/f3448f45f82a6da6dd2466b50b537309/aero-js-config-0.4.0.tgz","_from":"file:aero-js-config-0.4.0.tgz","_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-30U4f7JZXPPShoCS7KZckqg5djsTOPeYUJEf2+1TdZznf/B232eSmKjaMawIfMzVHXAYZnK/lA128nNRDWaq3w==","shasum":"6385ee87e82137dd7442437cf7c77ee62f665fd0","tarball":"https://registry.npmjs.org/@aero-js/config/-/config-0.4.0.tgz","fileCount":11,"unpackedSize":29558,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGGY+gZImxuSLQs9KL/y9XnJKTHCRYgAjmWgOWh5aYm1AiA1QWKpiiDbZaDKIEqcHtgzmOic2xmO2o2eZuQEiCnA/w=="}]},"_npmUser":{"name":"jmwlsn","email":"jamie@jamiewilson.io"},"directories":{},"maintainers":[{"name":"jmwlsn","email":"jamie@jamiewilson.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/config_0.4.0_1777591034904_0.8189327043600074"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-06T17:15:55.803Z","modified":"2026-04-30T23:17:15.188Z","0.3.3":"2026-03-06T17:15:56.069Z","0.3.4":"2026-03-16T16:00:35.074Z","0.3.5":"2026-03-18T15:49:49.482Z","0.4.0":"2026-04-30T23:17:15.032Z"},"bugs":{"url":"https://github.com/jamiewilson/aero/issues"},"author":{"name":"Jamie Wilson"},"license":"MIT","homepage":"https://github.com/jamiewilson/aero","repository":{"type":"git","url":"git+https://github.com/jamiewilson/aero.git","directory":"packages/config"},"description":"Typed Aero configuration and Vite config factory. Used by `aero.config.ts` and the dev/build entry to produce the final Vite config (Aero plugin, optional content plugin, and user overrides).","maintainers":[{"name":"jmwlsn","email":"jamie@jamiewilson.io"}],"readme":"# @aero-js/config\n\nTyped Aero configuration and Vite config factory. Used by `aero.config.ts` and the dev/build entry to produce the final Vite config (Aero plugin, optional content plugin, and user overrides).\n\n## Exports\n\n### `@aero-js/config` (main)\n\n| Export                                               | Description                                                                                                                                                                                                                                          |\n| ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `defineConfig(config)`                               | Typed helper for `aero.config.ts`. Accepts a static `AeroConfig` or `AeroConfigFunction`. Returns the config unchanged (for IDE/type inference).                                                                                                     |\n| `loadAeroConfig(root)`                               | Loads `aero.config.ts` / `.js` / `.mjs` from `root` via jiti + the same path aliases as Vite (`jitiAliasRecordFromProject`). Returns `AeroConfig \\| AeroConfigFunction \\| null`. Used by **`@aero-js/cli`** **`aero check`** and optional fallbacks. |\n| `redirectsToRouteRules`                              | Convert redirect entries for Nitro.                                                                                                                                                                                                                  |\n| `AeroConfig`, `AeroConfigFunction`, `AeroUserConfig` | TypeScript types for config shape and env-aware function.                                                                                                                                                                                            |\n\n### `@aero-js/config/vite`\n\nImport **only** from `vite.config.ts` (pulls in Vite). Do **not** import this entry from `aero.config.ts` — jiti would load Vite in a CJS eval context and fail.\n\n| Export                                  | Description                                                                                                                                                                                   |\n| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `createViteConfig(aeroConfig, options)` | Builds the Vite `UserConfig` from Aero config and env (`command`, `mode`). Merges defaults, Aero + content plugins, and user `vite`; preserves base `minify`/`cssMinify` when user sets them. |\n| `getDefaultOptions()`                   | Derive `command` / `mode` from argv and `NODE_ENV`.                                                                                                                                           |\n\n## Config shape (`AeroConfig`)\n\n| Field         | Type                            | Description                                                                                                                                                             |\n| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `content`     | `boolean \\| AeroContentOptions` | Enable content collections. `true` or options (e.g. `config` path).                                                                                                     |\n| `server`      | `boolean`                       | Enable Nitro server integration (default: `false`).                                                                                                                     |\n| `site`        | `{ url: string }`               | Canonical site URL (e.g. `{ url: 'https://example.com' }`). Exposed as `import.meta.env.SITE` and `Aero.site.url` in templates; used for sitemap, RSS, canonical links. |\n| `dirs`        | `object`                        | Overrides: `client`, `server`, `dist`. Same shape as the aero() Vite plugin.                                                                                            |\n| `vite`        | `UserConfig`                    | Vite config merged with Aero defaults.                                                                                                                                  |\n| `incremental` | `boolean`                       | When `true`, `vite build` sets `AERO_INCREMENTAL` if unset ([incremental builds](../../docs/tooling/incremental-builds.mdx)).                                        |\n\n## Usage\n\n**aero.config.ts**\n\n```ts\nimport { defineConfig } from '@aero-js/config'\n\nexport default defineConfig({\n\tcontent: true,\n\tserver: true,\n\tsite: { url: 'https://example.com' }, // optional; for sitemap, RSS, canonical URLs\n\tdirs: { client: 'client', dist: 'dist' },\n\tvite: { build: { target: 'esnext' } },\n})\n```\n\n**Config as a function (env-aware)**\n\n```ts\nimport { defineConfig } from '@aero-js/config'\n\nexport default defineConfig(({ command, mode }) => ({\n\tcontent: true,\n\tserver: mode === 'production',\n\tvite: command === 'build' ? { build: { minify: true } } : {},\n}))\n```\n\n**vite.config.ts (build entry)**\n\n```ts\nimport { createViteConfig } from '@aero-js/config/vite'\nimport aeroConfig from './aero.config.ts'\n\nexport default createViteConfig(aeroConfig, {\n\tcommand: process.argv.includes('build') ? 'build' : 'dev',\n\tmode: (process.env.NODE_ENV as 'development' | 'production') || 'development',\n})\n```\n\n## Defaults\n\n`createViteConfig` uses a base Vite config from the package: PostCSS (autoprefixer), `build.cssMinify: 'esbuild'`, and rolldown `checks.eval: false`. The Aero plugin (`aero()`) from `@aero-js/vite` is always included; the content plugin (`aeroContent()`) from `@aero-js/content/vite` is added when `content` is enabled.\n\n## Peer dependencies\n\n- `vite` ^8.0.0\n- `@aero-js/core` (workspace)\n- `@aero-js/content` (workspace)\n","readmeFilename":"README.md"}