diff --git a/packages/vite/rollup.config.ts b/packages/vite/rollup.config.ts index a271d4f3562906..8861f796cdfcec 100644 --- a/packages/vite/rollup.config.ts +++ b/packages/vite/rollup.config.ts @@ -181,7 +181,7 @@ function createCjsConfig(isProduction: boolean) { ...Object.keys(pkg.dependencies), ...(isProduction ? [] : Object.keys(pkg.devDependencies)) ], - plugins: [...createNodePlugins(false, false, false), bundleSizeLimit(120)] + plugins: [...createNodePlugins(false, false, false), bundleSizeLimit(930)] }) } diff --git a/packages/vite/src/node/plugins/asset.ts b/packages/vite/src/node/plugins/asset.ts index 0db1301a876fdb..a51f393f66ffb0 100644 --- a/packages/vite/src/node/plugins/asset.ts +++ b/packages/vite/src/node/plugins/asset.ts @@ -260,8 +260,8 @@ export function resolveAssetFileNames( } /** - * converts the source filepath of the asset to the output filename based on the assetFileNames option. \ - * this function imitates the behavior of rollup.js. \ + * converts the source filepath of the asset to the output filename based on the assetFileNames option. + * this function imitates the behavior of rollup.js. * https://rollupjs.org/guide/en/#outputassetfilenames * * @example @@ -276,10 +276,10 @@ export function resolveAssetFileNames( * // fileName: 'assets/file.982d9e3e.txt' * ``` * - * @param assetFileNames filename pattern. e.g. `'assets/[name].[hash][extname]'` - * @param file filepath of the asset - * @param contentHash hash of the asset. used for `'[hash]'` placeholder - * @param content content of the asset. passed to `assetFileNames` if `assetFileNames` is a function + * @param assetFileNames - filename pattern. e.g. `'assets/[name].[hash][extname]'` + * @param file - filepath of the asset + * @param contentHash - hash of the asset. used for `'[hash]'` placeholder + * @param content - content of the asset. passed to `assetFileNames` if `assetFileNames` is a function * @returns output filename */ export function assetFileNamesToFileName( diff --git a/packages/vite/src/node/publicUtils.ts b/packages/vite/src/node/publicUtils.ts index 5bf523a87f5799..be30fefc725ab9 100644 --- a/packages/vite/src/node/publicUtils.ts +++ b/packages/vite/src/node/publicUtils.ts @@ -10,7 +10,17 @@ export { splitVendorChunkPlugin, splitVendorChunk } from './plugins/splitVendorChunk' -export { normalizePath, mergeConfig, mergeAlias, createFilter } from './utils' +export { + assetFileNamesToFileName, + resolveAssetFileNames +} from './plugins/asset' +export { + normalizePath, + mergeConfig, + mergeAlias, + createFilter, + getHash +} from './utils' export { send } from './server/send' export { createLogger } from './logger' export { searchForWorkspaceRoot } from './server/searchRoot'