astro 4.0.0-beta.3 → 4.0.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/LICENSE +0 -2
  2. package/dist/@types/astro.d.ts +155 -112
  3. package/dist/assets/build/generate.d.ts +1 -1
  4. package/dist/assets/build/generate.js +0 -1
  5. package/dist/core/build/buildPipeline.d.ts +1 -1
  6. package/dist/core/build/buildPipeline.js +0 -1
  7. package/dist/core/build/generate.js +7 -7
  8. package/dist/core/build/index.js +1 -1
  9. package/dist/core/build/plugins/plugin-manifest.js +5 -5
  10. package/dist/core/build/util.js +2 -2
  11. package/dist/core/compile/compile.js +1 -1
  12. package/dist/core/config/schema.d.ts +266 -256
  13. package/dist/core/config/schema.js +74 -66
  14. package/dist/core/config/settings.js +1 -1
  15. package/dist/core/constants.js +1 -1
  16. package/dist/core/create-vite.js +1 -1
  17. package/dist/core/dev/dev.js +1 -1
  18. package/dist/core/dev/restart.d.ts +1 -1
  19. package/dist/core/dev/restart.js +0 -1
  20. package/dist/core/logger/node.js +0 -1
  21. package/dist/core/messages.js +2 -2
  22. package/dist/core/render/params-and-props.d.ts +1 -1
  23. package/dist/core/render/params-and-props.js +1 -1
  24. package/dist/core/render/route-cache.js +0 -1
  25. package/dist/core/routing/manifest/create.js +1 -2
  26. package/dist/i18n/index.d.ts +4 -4
  27. package/dist/i18n/index.js +4 -4
  28. package/dist/i18n/vite-plugin-i18n.js +1 -1
  29. package/dist/integrations/index.d.ts +1 -1
  30. package/dist/integrations/index.js +4 -2
  31. package/dist/preferences/defaults.d.ts +1 -1
  32. package/dist/preferences/defaults.js +1 -1
  33. package/dist/runtime/client/dev-overlay/entrypoint.js +31 -19
  34. package/dist/runtime/client/dev-overlay/overlay.js +31 -41
  35. package/dist/runtime/client/dev-overlay/plugins/astro.js +15 -15
  36. package/dist/runtime/client/dev-overlay/plugins/audit/a11y.d.ts +26 -0
  37. package/dist/runtime/client/dev-overlay/plugins/audit/a11y.js +580 -0
  38. package/dist/runtime/client/dev-overlay/plugins/{audit.d.ts → audit/index.d.ts} +15 -0
  39. package/dist/runtime/client/dev-overlay/plugins/{audit.js → audit/index.js} +70 -18
  40. package/dist/runtime/client/dev-overlay/plugins/settings.js +21 -14
  41. package/dist/runtime/client/dev-overlay/plugins/utils/highlight.js +4 -1
  42. package/dist/runtime/client/dev-overlay/plugins/utils/window.js +1 -1
  43. package/dist/runtime/client/dev-overlay/plugins/xray.d.ts +1 -1
  44. package/dist/runtime/client/dev-overlay/plugins/xray.js +40 -10
  45. package/dist/runtime/client/dev-overlay/ui-library/button.js +2 -1
  46. package/dist/runtime/client/dev-overlay/ui-library/tooltip.js +8 -3
  47. package/dist/runtime/client/dev-overlay/ui-library/window.js +4 -0
  48. package/dist/runtime/server/render/common.d.ts +1 -1
  49. package/dist/runtime/server/render/common.js +1 -1
  50. package/dist/runtime/server/render/component.d.ts +1 -1
  51. package/dist/runtime/server/render/component.js +1 -1
  52. package/dist/transitions/router.js +33 -46
  53. package/dist/vite-plugin-astro/hmr.d.ts +1 -1
  54. package/dist/vite-plugin-astro/hmr.js +1 -5
  55. package/dist/vite-plugin-astro-server/plugin.js +5 -5
  56. package/dist/vite-plugin-astro-server/route.js +7 -11
  57. package/dist/vite-plugin-dev-overlay/vite-plugin-dev-overlay.js +1 -1
  58. package/package.json +6 -3
package/LICENSE CHANGED
@@ -20,7 +20,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
22
22
 
23
-
24
23
  """
25
24
  This license applies to parts of the `packages/create-astro` and `packages/astro` subdirectories originating from the https://github.com/sveltejs/kit repository:
26
25
 
@@ -33,7 +32,6 @@ The above copyright notice and this permission notice shall be included in all c
33
32
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34
33
  """
35
34
 
36
-
37
35
  """
38
36
  This license applies to parts of the `packages/create-astro` and `packages/astro` subdirectories originating from the https://github.com/vitejs/vite repository:
39
37
 
@@ -1057,6 +1057,7 @@ export interface AstroUserConfig {
1057
1057
  * @docs
1058
1058
  * @kind heading
1059
1059
  * @name Dev Overlay Options
1060
+ * @deprecated Use `devToolbar` instead.
1060
1061
  */
1061
1062
  devOverlay?: {
1062
1063
  /**
@@ -1080,6 +1081,33 @@ export interface AstroUserConfig {
1080
1081
  */
1081
1082
  defaultState: 'minimized' | 'expanded';
1082
1083
  };
1084
+ /**
1085
+ * @docs
1086
+ * @kind heading
1087
+ * @name Dev Toolbar Options
1088
+ */
1089
+ devToolbar?: {
1090
+ /**
1091
+ * @docs
1092
+ * @name devToolbar.enabled
1093
+ * @type {boolean}
1094
+ * @default `true`
1095
+ * @description
1096
+ * Whether to enable the Astro Dev Toolbar. This toolbar allows you to inspect your page islands, see helpful audits on performance and accessibility, and more.
1097
+ *
1098
+ * This option is scoped to the entire project, to only disable the toolbar for yourself, run `npm run astro preferences disable devToolbar`. To disable the toolbar for all your Astro projects, run `npm run astro preferences disable devToolbar --global`.
1099
+ */
1100
+ enabled: boolean;
1101
+ /**
1102
+ * @docs
1103
+ * @name devToolbar.defaultState
1104
+ * @type {'minimized' | 'expanded'}
1105
+ * @default `minimized`
1106
+ * @description
1107
+ * Whether the Dev Toolbar should be expanded or minimized by default.
1108
+ */
1109
+ defaultState: 'minimized' | 'expanded';
1110
+ };
1083
1111
  /**
1084
1112
  * @docs
1085
1113
  * @kind heading
@@ -1274,141 +1302,141 @@ export interface AstroUserConfig {
1274
1302
  * Astro offers experimental flags to give users early access to new features.
1275
1303
  * These flags are not guaranteed to be stable.
1276
1304
  */
1277
- experimental?: {
1305
+ /**
1306
+ * @docs
1307
+ * @name i18n
1308
+ * @type {object}
1309
+ * @version 3.5.0
1310
+ * @type {object}
1311
+ * @description
1312
+ *
1313
+ * Configures experimental i18n routing and allows you to specify some customization options.
1314
+ *
1315
+ * See our guide for more information on [internationalization in Astro](/en/guides/internationalization/)
1316
+ */
1317
+ i18n?: {
1278
1318
  /**
1279
1319
  * @docs
1280
- * @name experimental.optimizeHoistedScript
1281
- * @type {boolean}
1282
- * @default `false`
1283
- * @version 2.10.4
1320
+ * @kind h4
1321
+ * @name i18n.defaultLocale
1322
+ * @type {string}
1323
+ * @version 3.5.0
1284
1324
  * @description
1285
- * Prevents unused components' scripts from being included in a page unexpectedly.
1286
- * The optimization is best-effort and may inversely miss including the used scripts. Make sure to double-check your built pages
1287
- * before publishing.
1288
- * Enable hoisted script analysis optimization by adding the experimental flag:
1325
+ *
1326
+ * The default locale of your website/application. This is a required field.
1327
+ *
1328
+ * No particular language format or syntax is enforced, but we suggest using lower-case and hyphens as needed (e.g. "es", "pt-br") for greatest compatibility.
1329
+ */
1330
+ defaultLocale: string;
1331
+ /**
1332
+ * @docs
1333
+ * @kind h4
1334
+ * @name i18n.locales
1335
+ * @type {Locales}
1336
+ * @version 3.5.0
1337
+ * @description
1338
+ *
1339
+ * A list of all locales supported by the website, including the `defaultLocale`. This is a required field.
1340
+ *
1341
+ * Languages can be listed either as individual codes (e.g. `['en', 'es', 'pt-br']`) or mapped to a shared `path` of codes (e.g. `{ path: "english", codes: ["en", "en-US"]}`). These codes will be used to determine the URL structure of your deployed site.
1342
+ *
1343
+ * No particular language code format or syntax is enforced, but your project folders containing your content files must match exactly the `locales` items in the list. In the case of multiple `codes` pointing to a custom URL path prefix, store your content files in a folder with the same name as the `path` configured.
1344
+ */
1345
+ locales: Locales;
1346
+ /**
1347
+ * @docs
1348
+ * @kind h4
1349
+ * @name i18n.fallback
1350
+ * @type {Record<string, string>}
1351
+ * @version 3.5.0
1352
+ * @description
1353
+ *
1354
+ * The fallback strategy when navigating to pages that do not exist (e.g. a translated page has not been created).
1355
+ *
1356
+ * Use this object to declare a fallback `locale` route for each language you support. If no fallback is specified, then unavailable pages will return a 404.
1357
+ *
1358
+ * ##### Example
1359
+ *
1360
+ * The following example configures your content fallback strategy to redirect unavailable pages in `/pt-br/` to their `es` version, and unavailable pages in `/fr/` to their `en` version. Unavailable `/es/` pages will return a 404.
1289
1361
  *
1290
1362
  * ```js
1291
- * {
1363
+ * export default defineConfig({
1292
1364
  * experimental: {
1293
- * optimizeHoistedScript: true,
1294
- * },
1295
- * }
1365
+ * i18n: {
1366
+ * defaultLocale: "en",
1367
+ * locales: ["en", "fr", "pt-br", "es"],
1368
+ * fallback: {
1369
+ * pt: "es",
1370
+ * fr: "en"
1371
+ * }
1372
+ * }
1373
+ * }
1374
+ * })
1296
1375
  * ```
1297
1376
  */
1298
- optimizeHoistedScript?: boolean;
1377
+ fallback?: Record<string, string>;
1299
1378
  /**
1300
1379
  * @docs
1301
- * @name experimental.i18n
1302
- * @type {object}
1303
- * @version 3.5.0
1304
- * @type {object}
1380
+ * @kind h4
1381
+ * @name i18n.routing
1382
+ * @type {Routing}
1383
+ * @version 3.7.0
1305
1384
  * @description
1306
1385
  *
1307
- * Configures experimental i18n routing and allows you to specify some customization options.
1308
- *
1309
- * See our guide for more information on [internationalization in Astro](/en/guides/internationalization/)
1386
+ * Controls the routing strategy to determine your site URLs. Set this based on your folder/URL path configuration for your default language.
1310
1387
  */
1311
- i18n?: {
1388
+ routing?: {
1312
1389
  /**
1313
1390
  * @docs
1314
- * @kind h4
1315
- * @name experimental.i18n.defaultLocale
1316
- * @type {string}
1317
- * @version 3.5.0
1318
- * @description
1319
- *
1320
- * The default locale of your website/application. This is a required field.
1321
- *
1322
- * No particular language format or syntax is enforced, but we suggest using lower-case and hyphens as needed (e.g. "es", "pt-br") for greatest compatibility.
1323
- */
1324
- defaultLocale: string;
1325
- /**
1326
- * @docs
1327
- * @kind h4
1328
- * @name experimental.i18n.locales
1329
- * @type {Locales}
1330
- * @version 3.5.0
1331
- * @description
1332
- *
1333
- * A list of all locales supported by the website, including the `defaultLocale`. This is a required field.
1334
- *
1335
- * Languages can be listed either as individual codes (e.g. `['en', 'es', 'pt-br']`) or mapped to a shared `path` of codes (e.g. `{ path: "english", codes: ["en", "en-US"]}`). These codes will be used to determine the URL structure of your deployed site.
1336
- *
1337
- * No particular language code format or syntax is enforced, but your project folders containing your content files must match exactly the `locales` items in the list. In the case of multiple `codes` pointing to a custom URL path prefix, store your content files in a folder with the same name as the `path` configured.
1338
- */
1339
- locales: Locales;
1340
- /**
1341
- * @docs
1342
- * @kind h4
1343
- * @name experimental.i18n.fallback
1344
- * @type {Record<string, string>}
1345
- * @version 3.5.0
1391
+ * @name i18n.routing.prefixDefaultLocale
1392
+ * @type {boolean}
1393
+ * @default `false`
1394
+ * @version 3.7.0
1346
1395
  * @description
1347
1396
  *
1348
- * The fallback strategy when navigating to pages that do not exist (e.g. a translated page has not been created).
1349
- *
1350
- * Use this object to declare a fallback `locale` route for each language you support. If no fallback is specified, then unavailable pages will return a 404.
1351
- *
1352
- * ##### Example
1353
- *
1354
- * The following example configures your content fallback strategy to redirect unavailable pages in `/pt-br/` to their `es` version, and unavailable pages in `/fr/` to their `en` version. Unavailable `/es/` pages will return a 404.
1397
+ * When `false`, only non-default languages will display a language prefix.
1398
+ * The `defaultLocale` will not show a language prefix and content files do not exist in a localized folder.
1399
+ * URLs will be of the form `example.com/[locale]/content/` for all non-default languages, but `example.com/content/` for the default locale.
1355
1400
  *
1356
- * ```js
1357
- * export default defineConfig({
1358
- * experimental: {
1359
- * i18n: {
1360
- * defaultLocale: "en",
1361
- * locales: ["en", "fr", "pt-br", "es"],
1362
- * fallback: {
1363
- * pt: "es",
1364
- * fr: "en"
1365
- * }
1366
- * }
1367
- * }
1368
- * })
1369
- * ```
1401
+ * When `true`, all URLs will display a language prefix.
1402
+ * URLs will be of the form `example.com/[locale]/content/` for every route, including the default language.
1403
+ * Localized folders are used for every language, including the default.
1370
1404
  */
1371
- fallback?: Record<string, string>;
1405
+ prefixDefaultLocale: boolean;
1372
1406
  /**
1373
- * @docs
1374
- * @kind h4
1375
- * @name experimental.i18n.routing
1376
- * @type {Routing}
1407
+ * @name i18n.routing.strategy
1408
+ * @type {"pathname"}
1409
+ * @default `"pathname"`
1377
1410
  * @version 3.7.0
1378
1411
  * @description
1379
1412
  *
1380
- * Controls the routing strategy to determine your site URLs. Set this based on your folder/URL path configuration for your default language.
1413
+ * - `"pathanme": The strategy is applied to the pathname of the URLs
1381
1414
  */
1382
- routing?: {
1383
- /**
1384
- * @docs
1385
- * @name experimental.i18n.routing.prefixDefaultLocale
1386
- * @type {boolean}
1387
- * @default `false`
1388
- * @version 3.7.0
1389
- * @description
1390
- *
1391
- * When `false`, only non-default languages will display a language prefix.
1392
- * The `defaultLocale` will not show a language prefix and content files do not exist in a localized folder.
1393
- * URLs will be of the form `example.com/[locale]/content/` for all non-default languages, but `example.com/content/` for the default locale.
1394
- *
1395
- * When `true`, all URLs will display a language prefix.
1396
- * URLs will be of the form `example.com/[locale]/content/` for every route, including the default language.
1397
- * Localized folders are used for every language, including the default.
1398
- */
1399
- prefixDefaultLocale: boolean;
1400
- /**
1401
- * @name experimental.i18n.routing.strategy
1402
- * @type {"pathname"}
1403
- * @default `"pathname"`
1404
- * @version 3.7.0
1405
- * @description
1406
- *
1407
- * - `"pathanme": The strategy is applied to the pathname of the URLs
1408
- */
1409
- strategy: 'pathname';
1410
- };
1415
+ strategy: 'pathname';
1411
1416
  };
1417
+ };
1418
+ experimental?: {
1419
+ /**
1420
+ * @docs
1421
+ * @name experimental.optimizeHoistedScript
1422
+ * @type {boolean}
1423
+ * @default `false`
1424
+ * @version 2.10.4
1425
+ * @description
1426
+ * Prevents unused components' scripts from being included in a page unexpectedly.
1427
+ * The optimization is best-effort and may inversely miss including the used scripts. Make sure to double-check your built pages
1428
+ * before publishing.
1429
+ * Enable hoisted script analysis optimization by adding the experimental flag:
1430
+ *
1431
+ * ```js
1432
+ * {
1433
+ * experimental: {
1434
+ * optimizeHoistedScript: true,
1435
+ * },
1436
+ * }
1437
+ * ```
1438
+ */
1439
+ optimizeHoistedScript?: boolean;
1412
1440
  /**
1413
1441
  * @docs
1414
1442
  * @name experimental.contentCollectionCache
@@ -1574,7 +1602,7 @@ export interface AstroSettings {
1574
1602
  * Map of directive name (e.g. `load`) to the directive script code
1575
1603
  */
1576
1604
  clientDirectives: Map<string, string>;
1577
- devOverlayPlugins: string[];
1605
+ devToolbarApps: string[];
1578
1606
  middlewares: {
1579
1607
  pre: string[];
1580
1608
  post: string[];
@@ -2051,7 +2079,11 @@ export interface AstroIntegration {
2051
2079
  injectScript: (stage: InjectedScriptStage, content: string) => void;
2052
2080
  injectRoute: (injectRoute: InjectedRoute) => void;
2053
2081
  addClientDirective: (directive: ClientDirectiveConfig) => void;
2082
+ /**
2083
+ * @deprecated Use `addDevToolbarApp` instead.
2084
+ */
2054
2085
  addDevOverlayPlugin: (entrypoint: string) => void;
2086
+ addDevToolbarApp: (entrypoint: string) => void;
2055
2087
  addMiddleware: (mid: AstroIntegrationMiddleware) => void;
2056
2088
  logger: AstroIntegrationLogger;
2057
2089
  }) => void | Promise<void>;
@@ -2255,13 +2287,14 @@ export interface ClientDirectiveConfig {
2255
2287
  name: string;
2256
2288
  entrypoint: string;
2257
2289
  }
2258
- export interface DevOverlayPlugin {
2290
+ export interface DevToolbarApp {
2259
2291
  id: string;
2260
2292
  name: string;
2261
2293
  icon: Icon;
2262
2294
  init?(canvas: ShadowRoot, eventTarget: EventTarget): void | Promise<void>;
2263
2295
  beforeTogglingOff?(canvas: ShadowRoot): boolean | Promise<boolean>;
2264
2296
  }
2297
+ export type DevOverlayPlugin = DevToolbarApp;
2265
2298
  export type DevOverlayMetadata = Window & typeof globalThis & {
2266
2299
  __astro_dev_overlay__: {
2267
2300
  defaultState: AstroConfig['devOverlay']['defaultState'];
@@ -2272,6 +2305,16 @@ export type DevOverlayMetadata = Window & typeof globalThis & {
2272
2305
  };
2273
2306
  declare global {
2274
2307
  interface HTMLElementTagNameMap {
2308
+ 'astro-dev-toolbar': AstroDevOverlay;
2309
+ 'astro-dev-toolbar-window': DevOverlayWindow;
2310
+ 'astro-dev-toolbar-plugin-canvas': DevOverlayCanvas;
2311
+ 'astro-dev-toolbar-tooltip': DevOverlayTooltip;
2312
+ 'astro-dev-toolbar-highlight': DevOverlayHighlight;
2313
+ 'astro-dev-toolbar-toggle': DevOverlayToggle;
2314
+ 'astro-dev-toolbar-badge': DevOverlayBadge;
2315
+ 'astro-dev-toolbar-button': DevOverlayButton;
2316
+ 'astro-dev-toolbar-icon': DevOverlayIcon;
2317
+ 'astro-dev-toolbar-card': DevOverlayCard;
2275
2318
  'astro-dev-overlay': AstroDevOverlay;
2276
2319
  'astro-dev-overlay-window': DevOverlayWindow;
2277
2320
  'astro-dev-overlay-plugin-canvas': DevOverlayCanvas;
@@ -1,4 +1,4 @@
1
- import PQueue from 'p-queue';
1
+ import type PQueue from 'p-queue';
2
2
  import type { AstroConfig } from '../../@types/astro.js';
3
3
  import type { BuildPipeline } from '../../core/build/buildPipeline.js';
4
4
  import type { Logger } from '../../core/logger/core.js';
@@ -1,7 +1,6 @@
1
1
  import { dim, green } from "kleur/colors";
2
2
  import fs, { readFileSync } from "node:fs";
3
3
  import { basename, join } from "node:path/posix";
4
- import PQueue from "p-queue";
5
4
  import { getOutDirWithinCwd } from "../../core/build/common.js";
6
5
  import { getTimeStat } from "../../core/build/util.js";
7
6
  import { isRemotePath, prependForwardSlash } from "../../core/path.js";
@@ -1,6 +1,6 @@
1
1
  import type { AstroConfig, AstroSettings } from '../../@types/astro.js';
2
2
  import type { SSRManifest } from '../app/types.js';
3
- import { Logger } from '../logger/core.js';
3
+ import type { Logger } from '../logger/core.js';
4
4
  import { Pipeline } from '../pipeline.js';
5
5
  import type { BuildInternals } from './internal.js';
6
6
  import type { PageBuildData, StaticBuildOptions } from './types.js';
@@ -1,6 +1,5 @@
1
1
  import { getOutputDirectory, isServerLikeOutput } from "../../prerender/utils.js";
2
2
  import { BEFORE_HYDRATION_SCRIPT_ID } from "../../vite-plugin-scripts/index.js";
3
- import { Logger } from "../logger/core.js";
4
3
  import { Pipeline } from "../pipeline.js";
5
4
  import { routeIsFallback, routeIsRedirect } from "../redirects/helpers.js";
6
5
  import { createEnvironment } from "../render/index.js";
@@ -200,7 +200,7 @@ async function generatePage(pageData, ssrEntry, builtPaths, pipeline) {
200
200
  pipeline.getManifest().base,
201
201
  pipeline.getManifest().trailingSlash
202
202
  );
203
- if (config.experimental.i18n && i18nMiddleware) {
203
+ if (config.i18n && i18nMiddleware) {
204
204
  if (onRequest) {
205
205
  pipeline.setMiddlewareFunction(sequence(i18nMiddleware, onRequest));
206
206
  } else {
@@ -396,7 +396,7 @@ async function generatePath(pathname, pipeline, gopts, route) {
396
396
  logger: pipeline.getLogger(),
397
397
  ssr
398
398
  });
399
- const i18n = pipeline.getConfig().experimental.i18n;
399
+ const i18n = pipeline.getConfig().i18n;
400
400
  const renderContext = await createRenderContext({
401
401
  pathname,
402
402
  request,
@@ -457,12 +457,12 @@ async function generatePath(pathname, pipeline, gopts, route) {
457
457
  }
458
458
  function createBuildManifest(settings, internals, renderers) {
459
459
  let i18nManifest = void 0;
460
- if (settings.config.experimental.i18n) {
460
+ if (settings.config.i18n) {
461
461
  i18nManifest = {
462
- fallback: settings.config.experimental.i18n.fallback,
463
- routing: settings.config.experimental.i18n.routing,
464
- defaultLocale: settings.config.experimental.i18n.defaultLocale,
465
- locales: settings.config.experimental.i18n.locales
462
+ fallback: settings.config.i18n.fallback,
463
+ routing: settings.config.i18n.routing,
464
+ defaultLocale: settings.config.i18n.defaultLocale,
465
+ locales: settings.config.i18n.locales
466
466
  };
467
467
  }
468
468
  return {
@@ -16,7 +16,7 @@ import { resolveConfig } from "../config/config.js";
16
16
  import { createNodeLogger } from "../config/logging.js";
17
17
  import { createSettings } from "../config/settings.js";
18
18
  import { createVite } from "../create-vite.js";
19
- import { Logger, levels, timerMessage } from "../logger/core.js";
19
+ import { levels, timerMessage } from "../logger/core.js";
20
20
  import { apply as applyPolyfill } from "../polyfill.js";
21
21
  import { RouteCache } from "../render/route-cache.js";
22
22
  import { createRouteManifest } from "../routing/index.js";
@@ -180,12 +180,12 @@ function buildManifest(opts, internals, staticFiles) {
180
180
  entryModules[BEFORE_HYDRATION_SCRIPT_ID] = "";
181
181
  }
182
182
  let i18nManifest = void 0;
183
- if (settings.config.experimental.i18n) {
183
+ if (settings.config.i18n) {
184
184
  i18nManifest = {
185
- fallback: settings.config.experimental.i18n.fallback,
186
- routing: settings.config.experimental.i18n.routing,
187
- locales: settings.config.experimental.i18n.locales,
188
- defaultLocale: settings.config.experimental.i18n.defaultLocale
185
+ fallback: settings.config.i18n.fallback,
186
+ routing: settings.config.i18n.routing,
187
+ locales: settings.config.i18n.locales,
188
+ defaultLocale: settings.config.i18n.defaultLocale
189
189
  };
190
190
  }
191
191
  return {
@@ -19,8 +19,8 @@ function shouldAppendForwardSlash(trailingSlash, buildFormat) {
19
19
  }
20
20
  }
21
21
  function i18nHasFallback(config) {
22
- if (config.experimental.i18n && config.experimental.i18n.fallback) {
23
- return Object.keys(config.experimental.i18n.fallback).length > 0;
22
+ if (config.i18n && config.i18n.fallback) {
23
+ return Object.keys(config.i18n.fallback).length > 0;
24
24
  }
25
25
  return false;
26
26
  }
@@ -1,7 +1,7 @@
1
1
  import { transform } from "@astrojs/compiler";
2
2
  import { fileURLToPath } from "node:url";
3
3
  import { normalizePath } from "vite";
4
- import { AggregateError, AstroError, CompilerError } from "../errors/errors.js";
4
+ import { AggregateError, CompilerError } from "../errors/errors.js";
5
5
  import { AstroErrorData } from "../errors/index.js";
6
6
  import { resolvePath } from "../util.js";
7
7
  import { createStylePreprocessor } from "./style.js";