Skip to content

Commit

Permalink
chore: applying review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Hines committed Dec 30, 2022
1 parent d1911d6 commit 91ac43b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/vite/src/node/plugins/asset.ts
Expand Up @@ -188,11 +188,10 @@ export function assetPlugin(config: ResolvedConfig): Plugin {
generateBundle(_, bundle) {
// do not emit assets for SSR build
if (config.command === 'build' && config.build.ssr) {
const assetFiles = Object.keys(bundle).filter(
(file) => bundle[file].type === 'asset',
)
for (const file of assetFiles) {
for (const file in bundle) {
const { type } = bundle[file]
if (
type === 'asset' &&
!file.endsWith('ssr-manifest.json') &&
!jsSourceMapRE.test(file)
) {
Expand Down

0 comments on commit 91ac43b

Please sign in to comment.