Skip to content

Commit

Permalink
Client too
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Dec 9, 2020
1 parent d172311 commit 3a423df
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scripts/rollup/bundles.js
Original file line number Diff line number Diff line change
Expand Up @@ -873,13 +873,18 @@ function getOriginalFilename(bundle, bundleType) {

function getFilename(bundle, bundleType) {
const originalFilename = getOriginalFilename(bundle, bundleType);
// Ensure .server.js or .client.js is the final suffix.
// This is important for the Server tooling convention.
if (originalFilename.indexOf('.server.') !== -1) {
// Ensure .server.js is the final suffix.
// This is important for the Server tooling convention.
return originalFilename
.replace('.server.', '.')
.replace('.js', '.server.js');
}
if (originalFilename.indexOf('.client.') !== -1) {
return originalFilename
.replace('.client.', '.')
.replace('.js', '.client.js');
}
return originalFilename;
}

Expand Down

0 comments on commit 3a423df

Please sign in to comment.