Skip to content

Commit 4349592

Browse files
author
Adam Hines
committed
chore: applying review feedback
1 parent d1911d6 commit 4349592

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/vite/src/node/plugins/asset.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,9 @@ export function assetPlugin(config: ResolvedConfig): Plugin {
188188
generateBundle(_, bundle) {
189189
// do not emit assets for SSR build
190190
if (config.command === 'build' && config.build.ssr) {
191-
const assetFiles = Object.keys(bundle).filter(
192-
(file) => bundle[file].type === 'asset',
193-
)
194-
for (const file of assetFiles) {
191+
for (const file in bundle) {
195192
if (
193+
bundle[file].type === 'asset' &&
196194
!file.endsWith('ssr-manifest.json') &&
197195
!jsSourceMapRE.test(file)
198196
) {

0 commit comments

Comments
 (0)