Skip to content

Using files from the "source" in "output" #61

Locked Answered by lucleray
gothy asked this question in Help
Discussion options

You must be logged in to vote

Hi @gothy ,

You can use custom Build Command and Output Directory to add custom logic to your Build and copy source files over to the output directory.

For example, if you are using Next.js, you can set your Build Command to next build && cp my-firebase-creds.txt output/my-firebase-creds.txt and your Output Directory to output.

Note that this will publish your file and your file will be exposed to your visitors.

If you want to keep your file content secret, you will need to find a way to pass the content of the file instead of a file path to the firebase library you are using.

Replies: 0 comments 13 replies

Comment options

You must be logged in to vote
12 replies
@rafinskipg
Comment options

@rafinskipg
Comment options

@cdock1029
Comment options

@rafinskipg
Comment options

@saitodisse
Comment options

Answer selected by gothy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
5 participants