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

Razzle 4 will not copy hidden files from public dir to build dir #1874

Open
eltuza opened this issue Jun 9, 2022 · 4 comments · May be fixed by #1875
Open

Razzle 4 will not copy hidden files from public dir to build dir #1874

eltuza opened this issue Jun 9, 2022 · 4 comments · May be fixed by #1875

Comments

@eltuza
Copy link

eltuza commented Jun 9, 2022

🐛 Bug report

Current Behavior

Inside the public directory, we have a hidden folder that needs to be copied into the build/public directory.
FTR the hidden folder .well-known is for Google's Digital Asset Links protocol, which needs to serve the following file: www.domain.com/.well-known/assetlinks.json

Using Razzle v3, this hidden folder was being copied to the build/public directory.
Upon upgrading to Razzle v4, this folder is omitted.

Expected behavior

Hidden folder inside public should also be copied to build/public during build.

Suggested solution(s)

Razzle 4 makes use of webpack-copy-plugin to copy these files.
There is a configuration missing in the patterns globOptions, required to also include hidden files:
globOptions: { dot: true }

Your environment

Software Version(s)
Razzle 4.2.17
Razzle Plugins
Node 15.14.0
Browser
Yarn 1.22.5
Operating System MacOS
TypeScript 3.8.3
React
@fivethreeo
Copy link
Collaborator

modify https://github.com/jaredpalmer/razzle/blob/master/packages/razzle/config/createConfigAsync.js#L957

remove and readd plugin in razzle config customization

@eltuza
Copy link
Author

eltuza commented Jun 10, 2022

not sure I follow... shall I go ahead and add the dot option to the plugin?

@fivethreeo
Copy link
Collaborator

Yes

@eltuza
Copy link
Author

eltuza commented Jun 13, 2022

please review :)

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 a pull request may close this issue.

2 participants