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 4349592
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/vite/src/node/plugins/asset.ts
Expand Up @@ -188,11 +188,9 @@ 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) {
if (
bundle[file].type === 'asset' &&
!file.endsWith('ssr-manifest.json') &&
!jsSourceMapRE.test(file)
) {
Expand Down

0 comments on commit 4349592

Please sign in to comment.