Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix manifest handling in SSR mode #13

Merged
merged 1 commit into from Jun 14, 2022
Merged

Fix manifest handling in SSR mode #13

merged 1 commit into from Jun 14, 2022

Conversation

jessarcher
Copy link
Member

@jessarcher jessarcher commented Jun 13, 2022

The manifest augmentation added in #9 broke SSR builds because the manifest file isn't typically created in this mode.

This PR addresses this by only augmenting the manifest when the manifest is enabled for the build.

It will also now use the manifest name from the resolved config if it exists.

src/index.ts Outdated Show resolved Hide resolved
@timacdonald
Copy link
Member

casually force pushing to your branch 😬

@@ -259,3 +265,20 @@ function resolveOutDir(config: PluginConfig, ssr: boolean): string|undefined {

return path.join(config.publicDirectory, config.buildDirectory)
}

function resolveManifestConfig(config: ResolvedConfig): string|false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This false return type is dedicated to @michaeldyrynda ❤️

@jessarcher
Copy link
Member Author

Changes look good!

Copy link
Member

@timacdonald timacdonald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jessarcher I've made some tweaks to accommodate the differing manifest filename in ssr mode, when just passing true.

Would love you to re-review before we merging.

@timacdonald
Copy link
Member

haha. beat me to it.

@timacdonald timacdonald merged commit 902a2ef into main Jun 14, 2022
@jessarcher jessarcher deleted the fix-ssr-build branch June 14, 2022 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants