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

[v3] Fix dev server not able to serve static files #1192

Closed
wants to merge 1 commit into from

Conversation

kevinxh
Copy link
Collaborator

@kevinxh kevinxh commented May 10, 2023

Description

The dev server has a bug where it fails to serve static files. This PR aims to fix the issue.

The bug was introduced in a402f66#diff-3c62fd04e584e6cbc2443d75ef447133665c8c21a1b34e0fa8b9d5a29cd88808 I don't exactly know why the CopyPlugin is moved to ssr.js webpack config, but that config is for production only.

This PR fixes the issue by ensuring the static files are copied into the build folder on both development and production environment.

verified change on production too https://scaffold-pwa-test-env.mobify-storefront.com/

Changes

  • Make sure the CopyPlugin for static files is included in dev webpack configs

How to Test-Drive This PR

  • npm start
  • verify the hero image shows up like
Screenshot 2023-05-10 at 3 33 08 PM

@kevinxh kevinxh requested a review from a team as a code owner May 10, 2023 22:35
@kevinxh kevinxh changed the title copy static files for dev server as well [v3] Fix dev server not able to serve static files May 10, 2023
@kevinxh kevinxh mentioned this pull request May 11, 2023
5 tasks
@kevinxh
Copy link
Collaborator Author

kevinxh commented May 11, 2023

closed as this is a dup #1196

@kevinxh kevinxh closed this May 11, 2023
@kevinxh kevinxh deleted the fix-dev-server-static-serving branch May 11, 2023 16:56
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.

1 participant