jaredpalmer / razzle

✨ Create server-rendered universal JavaScript applications with no configuration

Home Page:https://razzlejs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

eltuza opened this issue · comments

🐛 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

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

please review :)