Skip to content

Commit

Permalink
chore: deprecate rollupOptions.output.output to avoid subtle errors (
Browse files Browse the repository at this point in the history
…#5930)

* chore: deprecate `rollupOptions.output.output` to avoid subtle errors

As explained in #5812 (comment)

* chore: format with prettier
  • Loading branch information
haoqunjiang committed Dec 2, 2021
1 parent cf03ecf commit e3a1aa5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/vite/src/node/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,15 @@ async function doBuild(

try {
const buildOutputOptions = (output: OutputOptions = {}): OutputOptions => {
// @ts-ignore
if (output.output) {
config.logger.warn(
`You've set "rollupOptions.output.output" in your config. ` +
`This is deprecated and will override all Vite.js default output options. ` +
`Please use "rollupOptions.output" instead.`
)
}

return {
dir: outDir,
format: ssr ? 'cjs' : 'es',
Expand Down

0 comments on commit e3a1aa5

Please sign in to comment.