Skip to content

Commit b675c7b

Browse files
lgarronsapphi-red
andauthored
fix: refer to rolldownOptions instead of deprecated rollupOptions in messages (#22400)
Co-authored-by: sapphi-red <49056869+sapphi-red@users.noreply.github.com>
1 parent 66b9eb3 commit b675c7b

11 files changed

Lines changed: 25 additions & 25 deletions

File tree

docs/config/build-options.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Note the build will output a warning if the code contains features that cannot b
2121
- **Type:** `boolean | { polyfill?: boolean, resolveDependencies?: ResolveModulePreloadDependenciesFn }`
2222
- **Default:** `{ polyfill: true }`
2323

24-
By default, a [module preload polyfill](https://guybedford.com/es-module-preloading-integrity#modulepreload-polyfill) is automatically injected. The polyfill is auto injected into the proxy module of each `index.html` entry. If the build is configured to use a non-HTML custom entry via `build.rollupOptions.input`, then it is necessary to manually import the polyfill in your custom entry:
24+
By default, a [module preload polyfill](https://guybedford.com/es-module-preloading-integrity#modulepreload-polyfill) is automatically injected. The polyfill is auto injected into the proxy module of each `index.html` entry. If the build is configured to use a non-HTML custom entry via `build.rolldownOptions.input`, then it is necessary to manually import the polyfill in your custom entry:
2525

2626
```js
2727
import 'vite/modulepreload-polyfill'
@@ -269,7 +269,7 @@ When the value is a string, it will be used as the manifest file path relative t
269269
- **Default:** `false`
270270
- **Related:** [Server-Side Rendering](/guide/ssr)
271271

272-
Produce SSR-oriented build. The value can be a string to directly specify the SSR entry, or `true`, which requires specifying the SSR entry via `rollupOptions.input`.
272+
Produce SSR-oriented build. The value can be a string to directly specify the SSR entry, or `true`, which requires specifying the SSR entry via `rolldownOptions.input`.
273273

274274
## build.emitAssets
275275

docs/config/dep-optimization-options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Unless noted, the options in this section are only applied to the dependency opt
88

99
- **Type:** `string | string[]`
1010

11-
By default, Vite will crawl all your `.html` files to detect dependencies that need to be pre-bundled (ignoring `node_modules`, `build.outDir`, `__tests__` and `coverage`). If `build.rollupOptions.input` is specified, Vite will crawl those entry points instead.
11+
By default, Vite will crawl all your `.html` files to detect dependencies that need to be pre-bundled (ignoring `node_modules`, `build.outDir`, `__tests__` and `coverage`). If `build.rolldownOptions.input` is specified, Vite will crawl those entry points instead.
1212

1313
If neither of these fit your needs, you can specify custom entries using this option - the value should be a [`tinyglobby` pattern](https://superchupu.dev/tinyglobby/comparison) or array of patterns that are relative from Vite project root. This will overwrite default entries inference. Only `node_modules` and `build.outDir` folders will be ignored by default when `optimizeDeps.entries` is explicitly defined. If other folders need to be ignored, you can use an ignore pattern as part of the entries list, marked with an initial `!`. `node_modules` will not be ignored for patterns that explicitly include the string `node_modules`.
1414

docs/config/server-options.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ export default defineConfig({
433433

434434
Whether or not to ignore source files in the server sourcemap, used to populate the [`x_google_ignoreList` source map extension](https://developer.chrome.com/articles/x-google-ignore-list/).
435435

436-
`server.sourcemapIgnoreList` is the equivalent of [`build.rollupOptions.output.sourcemapIgnoreList`](https://rollupjs.org/configuration-options/#output-sourcemapignorelist) for the dev server. A difference between the two config options is that the rollup function is called with a relative path for `sourcePath` while `server.sourcemapIgnoreList` is called with an absolute path. During dev, most modules have the map and the source in the same folder, so the relative path for `sourcePath` is the file name itself. In these cases, absolute paths makes it convenient to be used instead.
436+
`server.sourcemapIgnoreList` is the equivalent of [`build.rolldownOptions.output.sourcemapIgnoreList`](https://rollupjs.org/configuration-options/#output-sourcemapignorelist) for the dev server. A difference between the two config options is that the rollup function is called with a relative path for `sourcePath` while `server.sourcemapIgnoreList` is called with an absolute path. During dev, most modules have the map and the source in the same folder, so the relative path for `sourcePath` is the file name itself. In these cases, absolute paths makes it convenient to be used instead.
437437

438438
By default, it excludes all paths containing `node_modules`. You can pass `false` to disable this behavior, or, for full control, a function that takes the source path and sourcemap path and returns whether to ignore the source path.
439439

@@ -450,5 +450,5 @@ export default defineConfig({
450450
```
451451

452452
::: tip Note
453-
[`server.sourcemapIgnoreList`](#server-sourcemapignorelist) and [`build.rollupOptions.output.sourcemapIgnoreList`](https://rollupjs.org/configuration-options/#output-sourcemapignorelist) need to be set independently. `server.sourcemapIgnoreList` is a server only config and doesn't get its default value from the defined rollup options.
453+
[`server.sourcemapIgnoreList`](#server-sourcemapignorelist) and [`build.rolldownOptions.output.sourcemapIgnoreList`](https://rollupjs.org/configuration-options/#output-sourcemapignorelist) need to be set independently. `server.sourcemapIgnoreList` is a server only config and doesn't get its default value from the defined rollup options.
454454
:::

docs/config/shared-options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ When `find` is a regular expression, the `replacement` can use [replacement patt
145145
If you have duplicated copies of the same dependency in your app (likely due to hoisting or linked packages in monorepos), use this option to force Vite to always resolve listed dependencies to the same copy (from project root).
146146

147147
:::warning SSR + ESM
148-
For SSR builds, deduplication does not work for ESM build outputs configured from `build.rollupOptions.output`. A workaround is to use CJS build outputs until ESM has better plugin support for module loading.
148+
For SSR builds, deduplication does not work for ESM build outputs configured from `build.rolldownOptions.output`. A workaround is to use CJS build outputs until ESM has better plugin support for module loading.
149149
:::
150150

151151
## resolve.conditions <NonInheritBadge />

docs/guide/api-javascript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ await build({
213213
root: path.resolve(import.meta.dirname, './project'),
214214
base: '/foo/',
215215
build: {
216-
rollupOptions: {
216+
rolldownOptions: {
217217
// ...
218218
},
219219
},

docs/guide/backend-integration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ If you need a custom integration, you can follow the steps in this guide to conf
2121
build: {
2222
// generate .vite/manifest.json in outDir
2323
manifest: true,
24-
rollupOptions: {
24+
rolldownOptions: {
2525
// overwrite default .html entry
2626
input: '/path/to/main.js',
2727
},
@@ -179,7 +179,7 @@ If you need a custom integration, you can follow the steps in this guide to conf
179179
```
180180

181181
Each entry in the manifest represents one of the following:
182-
- **Entry chunks**: Generated from files specified in [`build.rollupOptions.input`](https://rollupjs.org/configuration-options/#input). These chunks have `isEntry: true` and their key is the relative src path from project root.
182+
- **Entry chunks**: Generated from files specified in [`build.rolldownOptions.input`](https://rollupjs.org/configuration-options/#input). These chunks have `isEntry: true` and their key is the relative src path from project root.
183183
- **Dynamic entry chunks**: Generated from dynamic imports. These chunks have `isDynamicEntry: true` and their key is the relative src path from project root.
184184
- **Non-entry chunks**: Their key is the base name of the generated file prefixed with `_`.
185185
- **Asset chunks**: Generated from imported assets like images, fonts. Their key is the relative src path from project root.

packages/vite/src/node/__tests__/build.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ describe('resolveBuildOutputs', () => {
364364
const resolveBuild = () => resolveBuildOutputs(outputs, libOptions, logger)
365365

366366
expect(resolveBuild).toThrowError(
367-
/Entries in "build\.rollupOptions\.output" must specify "name"/,
367+
/Entries in "build\.rolldownOptions\.output" must specify "name"/,
368368
)
369369
})
370370

@@ -375,7 +375,7 @@ describe('resolveBuildOutputs', () => {
375375
const resolveBuild = () => resolveBuildOutputs(outputs, libOptions, logger)
376376

377377
expect(resolveBuild).toThrowError(
378-
/Entries in "build\.rollupOptions\.output" must specify "name"/,
378+
/Entries in "build\.rolldownOptions\.output" must specify "name"/,
379379
)
380380
})
381381
})
@@ -702,7 +702,7 @@ describe('resolveBuildOutputs', () => {
702702
).toEqual([{ name: 'A' }])
703703
expect(log.warn).toHaveBeenLastCalledWith(
704704
colors.yellow(
705-
`"build.lib.formats" will be ignored because "build.rollupOptions.output" is already an array format.`,
705+
`"build.lib.formats" will be ignored because "build.rolldownOptions.output" is already an array format.`,
706706
),
707707
)
708708
})

packages/vite/src/node/build.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -669,21 +669,21 @@ export function resolveRolldownOptions(
669669
// @ts-expect-error See https://github.com/vitejs/vite/issues/5812#issuecomment-984345618
670670
if (output.output) {
671671
logger.warn(
672-
`You've set "rollupOptions.output.output" in your config. ` +
672+
`You've set "rolldownOptions.output.output" in your config. ` +
673673
`This is deprecated and will override all Vite.js default output options. ` +
674-
`Please use "rollupOptions.output" instead.`,
674+
`Please use "rolldownOptions.output" instead.`,
675675
)
676676
}
677677
if (output.file) {
678678
throw new Error(
679-
`Vite does not support "rollupOptions.output.file". ` +
680-
`Please use "rollupOptions.output.dir" and "rollupOptions.output.entryFileNames" instead.`,
679+
`Vite does not support "rolldownOptions.output.file". ` +
680+
`Please use "rolldownOptions.output.dir" and "rolldownOptions.output.entryFileNames" instead.`,
681681
)
682682
}
683683
if (output.sourcemap) {
684684
logger.warnOnce(
685685
colors.yellow(
686-
`Vite does not support "rollupOptions.output.sourcemap". ` +
686+
`Vite does not support "rolldownOptions.output.sourcemap". ` +
687687
`Please use "build.sourcemap" instead.`,
688688
),
689689
)
@@ -1037,7 +1037,7 @@ export function resolveBuildOutputs(
10371037
if (libOptions.formats) {
10381038
logger.warn(
10391039
colors.yellow(
1040-
'"build.lib.formats" will be ignored because "build.rollupOptions.output" is already an array format.',
1040+
'"build.lib.formats" will be ignored because "build.rolldownOptions.output" is already an array format.',
10411041
),
10421042
)
10431043
}
@@ -1048,7 +1048,7 @@ export function resolveBuildOutputs(
10481048
!output.name
10491049
) {
10501050
throw new Error(
1051-
'Entries in "build.rollupOptions.output" must specify "name" when the format is "umd" or "iife".',
1051+
'Entries in "build.rolldownOptions.output" must specify "name" when the format is "umd" or "iife".',
10521052
)
10531053
}
10541054
})
@@ -1090,7 +1090,7 @@ export function onRollupLog(
10901090
`[vite]: Rolldown failed to resolve import "${exporter}" from "${id}".\n` +
10911091
`This is most likely unintended because it can break your application at runtime.\n` +
10921092
`If you do want to externalize this module explicitly add it to\n` +
1093-
`\`build.rollupOptions.external\``,
1093+
`\`build.rolldownOptions.external\``,
10941094
)
10951095
}
10961096
}

packages/vite/src/node/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2105,7 +2105,7 @@ export async function resolveConfig(
21052105
if (hasDifferentReference) {
21062106
resolved.logger.warn(
21072107
colors.yellow(`
2108-
assetFileNames isn't equal for every build.rollupOptions.output. A single pattern across all outputs is supported by Vite.
2108+
assetFileNames isn't equal for every build.rolldownOptions.output. A single pattern across all outputs is supported by Vite.
21092109
`),
21102110
)
21112111
}

packages/vite/src/node/optimizer/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export interface DepOptimizationConfig {
176176
export type DepOptimizationOptions = DepOptimizationConfig & {
177177
/**
178178
* By default, Vite will crawl your `index.html` to detect dependencies that
179-
* need to be pre-bundled. If `build.rollupOptions.input` is specified, Vite
179+
* need to be pre-bundled. If `build.rolldownOptions.input` is specified, Vite
180180
* will crawl those entry points instead.
181181
*
182182
* If neither of these fit your needs, you can specify custom entries using

0 commit comments

Comments
 (0)