File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -360,7 +360,7 @@ export default {
360360- Type: ` string `
361361- Default: ` assets `
362362
363- The directory for assets files. See also: [ assetsDir ] ( https://vitejs.dev/config/build-options.html#build-assetsdir ) .
363+ Specify the directory to nest generated assets under. The path should be inside [ ` outDir ` ] ( #outdir ) and is resolved relative to it .
364364
365365``` ts
366366export default {
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ export async function resolveConfig(
7474 const site = await resolveSiteData ( root , userConfig )
7575 const srcDir = normalizePath ( path . resolve ( root , userConfig . srcDir || '.' ) )
7676 const assetsDir = userConfig . assetsDir
77- ? userConfig . assetsDir . replace ( / \/ / g, '' )
77+ ? userConfig . assetsDir . replace ( / ( ^ \. ? \/ | \/ $ ) / g, '' )
7878 : 'assets'
7979 const outDir = userConfig . outDir
8080 ? normalizePath ( path . resolve ( root , userConfig . outDir ) )
You can’t perform that action at this time.
0 commit comments