mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
[ci] format
This commit is contained in:
parent
1ea0a25b94
commit
b44f830a0e
6 changed files with 10 additions and 10 deletions
|
@ -13,7 +13,7 @@ import type * as babel from '@babel/core';
|
|||
import type * as rollup from 'rollup';
|
||||
import type * as vite from 'vite';
|
||||
import type { RemotePattern } from '../assets/utils/remotePattern.js';
|
||||
import type { SerializedSSRManifest, AssetsPrefix } from '../core/app/types.js';
|
||||
import type { AssetsPrefix, SerializedSSRManifest } from '../core/app/types.js';
|
||||
import type { PageBuildData } from '../core/build/types.js';
|
||||
import type { AstroConfigType } from '../core/config/index.js';
|
||||
import type { AstroTimer } from '../core/config/timer.js';
|
||||
|
@ -910,7 +910,7 @@ export interface AstroUserConfig {
|
|||
* build: {
|
||||
* assetsPrefix: {
|
||||
* 'js': 'https://js.cdn.example.com',
|
||||
* 'mjs': 'https://js.cdn.example.com',
|
||||
* 'mjs': 'https://js.cdn.example.com',
|
||||
* 'css': 'https://css.cdn.example.com',
|
||||
* 'fallback': 'https://cdn.example.com'
|
||||
* }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { extname } from 'node:path';
|
||||
import MagicString from 'magic-string';
|
||||
import type * as vite from 'vite';
|
||||
import { normalizePath } from 'vite';
|
||||
import { extname } from 'node:path';
|
||||
import type { AstroPluginOptions, ImageTransform } from '../@types/astro.js';
|
||||
import { extendManualChunks } from '../core/build/plugins/util.js';
|
||||
import { AstroError, AstroErrorData } from '../core/errors/index.js';
|
||||
|
@ -14,10 +14,10 @@ import {
|
|||
import { isServerLikeOutput } from '../prerender/utils.js';
|
||||
import { VALID_INPUT_FORMATS, VIRTUAL_MODULE_ID, VIRTUAL_SERVICE_ID } from './consts.js';
|
||||
import { emitESMImage } from './utils/emitAsset.js';
|
||||
import { getAssetsPrefix } from './utils/getAssetsPrefix.js';
|
||||
import { isESMImportedImage } from './utils/imageKind.js';
|
||||
import { getProxyCode } from './utils/proxy.js';
|
||||
import { hashTransform, propsToFilename } from './utils/transformToPath.js';
|
||||
import { getAssetsPrefix } from './utils/getAssetsPrefix.js';
|
||||
|
||||
const resolvedVirtualModuleId = '\0' + VIRTUAL_MODULE_ID;
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import { extname } from 'node:path';
|
|||
import { pathToFileURL } from 'node:url';
|
||||
import type { Plugin, Rollup } from 'vite';
|
||||
import type { AstroSettings, SSRElement } from '../@types/astro.js';
|
||||
import { getAssetsPrefix } from '../assets/utils/getAssetsPrefix.js';
|
||||
import { moduleIsTopLevelPage, walkParentInfos } from '../core/build/graph.js';
|
||||
import { type BuildInternals, getPageDataByViteID } from '../core/build/internal.js';
|
||||
import type { AstroBuildPlugin } from '../core/build/plugin.js';
|
||||
|
@ -19,7 +20,6 @@ import {
|
|||
STYLES_PLACEHOLDER,
|
||||
} from './consts.js';
|
||||
import { hasContentFlag } from './utils.js';
|
||||
import { getAssetsPrefix } from '../assets/utils/getAssetsPrefix.js';
|
||||
|
||||
export function astroContentAssetPropagationPlugin({
|
||||
mode,
|
||||
|
|
|
@ -2,6 +2,7 @@ import { fileURLToPath } from 'node:url';
|
|||
import glob from 'fast-glob';
|
||||
import type { OutputChunk } from 'rollup';
|
||||
import { type Plugin as VitePlugin } from 'vite';
|
||||
import { getAssetsPrefix } from '../../../assets/utils/getAssetsPrefix.js';
|
||||
import { normalizeTheLocale } from '../../../i18n/index.js';
|
||||
import { toRoutingStrategy } from '../../../i18n/utils.js';
|
||||
import { runHookBuildSsr } from '../../../integrations/index.js';
|
||||
|
@ -11,14 +12,13 @@ import type {
|
|||
SerializedRouteInfo,
|
||||
SerializedSSRManifest,
|
||||
} from '../../app/types.js';
|
||||
import { joinPaths, prependForwardSlash, fileExtension } from '../../path.js';
|
||||
import { fileExtension, joinPaths, prependForwardSlash } from '../../path.js';
|
||||
import { serializeRouteData } from '../../routing/index.js';
|
||||
import { addRollupInput } from '../add-rollup-input.js';
|
||||
import { getOutFile, getOutFolder } from '../common.js';
|
||||
import { type BuildInternals, cssOrder, mergeInlineCss } from '../internal.js';
|
||||
import type { AstroBuildPlugin } from '../plugin.js';
|
||||
import type { StaticBuildOptions } from '../types.js';
|
||||
import { getAssetsPrefix } from '../../../assets/utils/getAssetsPrefix.js';
|
||||
|
||||
const manifestReplace = '@@ASTRO_MANIFEST_REPLACE@@';
|
||||
const replaceExp = new RegExp(`['"]${manifestReplace}['"]`, 'g');
|
||||
|
|
|
@ -4,6 +4,7 @@ import glob from 'fast-glob';
|
|||
import * as vite from 'vite';
|
||||
import { crawlFrameworkPkgs } from 'vitefu';
|
||||
import type { AstroSettings } from '../@types/astro.js';
|
||||
import { getAssetsPrefix } from '../assets/utils/getAssetsPrefix.js';
|
||||
import astroAssetsPlugin from '../assets/vite-plugin-assets.js';
|
||||
import {
|
||||
astroContentAssetPropagationPlugin,
|
||||
|
@ -36,7 +37,6 @@ import { createViteLogger } from './logger/vite.js';
|
|||
import { vitePluginMiddleware } from './middleware/vite-plugin.js';
|
||||
import { joinPaths } from './path.js';
|
||||
import { isObject } from './util.js';
|
||||
import { getAssetsPrefix } from '../assets/utils/getAssetsPrefix.js';
|
||||
|
||||
interface CreateViteOptions {
|
||||
settings: AstroSettings;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import type { SSRElement, AssetsPrefix } from '../../@types/astro.js';
|
||||
import type { AssetsPrefix, SSRElement } from '../../@types/astro.js';
|
||||
import { getAssetsPrefix } from '../../assets/utils/getAssetsPrefix.js';
|
||||
import { fileExtension, joinPaths, prependForwardSlash, slash } from '../../core/path.js';
|
||||
import type { StylesheetAsset } from '../app/types.js';
|
||||
import { getAssetsPrefix } from '../../assets/utils/getAssetsPrefix.js';
|
||||
|
||||
export function createAssetLink(href: string, base?: string, assetsPrefix?: AssetsPrefix): string {
|
||||
if (assetsPrefix) {
|
||||
|
|
Loading…
Reference in a new issue