Skip to content

Commit

Permalink
chore: cleanup #5601 (#5672)
Browse files Browse the repository at this point in the history
  • Loading branch information
sibbng committed Nov 14, 2021
1 parent 96b9fbb commit 3ba3e2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/vite/src/node/__tests__/build.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('resolveLibFilename', () => {
})
})

describe('resolvePaths', () => {
describe('resolveBuildOptions', () => {
test('resolve build.rollupOptions.input', async () => {
const config = await resolveConfig({
build: {
Expand Down
5 changes: 2 additions & 3 deletions packages/vite/src/node/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,8 @@ export function resolveBuildOptions(root: string, raw?: BuildOptions): ResolvedB
input = Array.isArray(raw.rollupOptions.input)
? raw.rollupOptions.input.map(input => resolve(input))
: typeof raw.rollupOptions.input === 'object'
? Object.assign(
// @ts-ignore
...Object.keys(raw.rollupOptions.input).map(key => ({ [key]: resolve(raw.rollupOptions.input[key]) }))
? Object.fromEntries(
Object.entries(raw.rollupOptions.input).map(([key, value]) => [key, resolve(value)])
)
: resolve(raw.rollupOptions.input)
} else {
Expand Down

0 comments on commit 3ba3e2c

Please sign in to comment.