Skip to content

Commit

Permalink
chore: only emit warning, but still copy publicDir
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed Jul 17, 2023
1 parent 9e1514e commit cf54822
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/vite/src/node/build.ts
Expand Up @@ -753,21 +753,20 @@ function prepareOutDir(
config.publicDir &&
fs.existsSync(config.publicDir)
) {
if (areSeparateFolders(outDir, config.publicDir)) {
copyDir(config.publicDir, outDir)
} else {
if (!areSeparateFolders(outDir, config.publicDir)) {
config.logger.warn(
colors.yellow(
`\n${colors.bold(
`(!)`,
)} The public directory feature is disabled. outDir ${colors.white(
)} The public directory feature may not work correctly. outDir ${colors.white(
colors.dim(outDir),
)} and publicDir ${colors.white(
colors.dim(config.publicDir),
)} are not separate folders.\n`,
),
)
}
copyDir(config.publicDir, outDir)
}
}
}
Expand Down

0 comments on commit cf54822

Please sign in to comment.