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

Pack server code together using webpack. #5

Merged
merged 2 commits into from
Jan 24, 2020
Merged

Pack server code together using webpack. #5

merged 2 commits into from
Jan 24, 2020

Conversation

yuchenshi
Copy link
Member

@yuchenshi yuchenshi commented Jan 24, 2020

To create a zipball:

npm run build:server
zip dist.zip -r server.bundle.js build

# Now try to extract it somewhere else and see if it runs:
cd /tmp/
unzip /path/to/ui/dist.zip
firebase emulators:exec --project foo --only database 'node server.bundle.js'

Now you can visit localhost:3000 for a bundled version of the Emulator UI.

Note that this is not gonna work later if we ever introduce native dependencies (e.g. grpc, or anything that depends on grpc like Firestore SDK.)

@samtstern
Copy link

Tested building on Linux and using the bundle on both Linux and macOS

@yuchenshi yuchenshi merged commit 30aeafb into master Jan 24, 2020
@yuchenshi yuchenshi deleted the ys/packaging branch January 24, 2020 23:31
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.

2 participants