Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
[exp] clear RN packager cache before publish
Browse files Browse the repository at this point in the history
When you publish your project, you might use different environment variables than the ones used when developing.

If you don'\''t clear the RN packager cache, you might publish to Expo production the Js bundle that is suited for your local development, and former env variable values (suited for local dev) are cached.

See related issue: expo/create-react-native-app#500

Closes expo/exp#88
  • Loading branch information
slorber authored and fson committed Dec 12, 2017
1 parent b13fde4 commit 704659e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dev/exp/src/commands/publish.js
Expand Up @@ -31,7 +31,7 @@ export async function action(projectDir: string, options: Options = {}) {
if (status !== 'running') {
log('Unable to find an existing exp instance for this directory, starting a new one...');
installExitHooks(projectDir);
await Project.startAsync(projectDir, {}, !options.quiet);
await Project.startAsync(projectDir, {reset: options.clear}, !options.quiet);
startedOurOwn = true;
}

Expand Down Expand Up @@ -81,6 +81,7 @@ export default (program: any) => {
.description('Publishes your project to exp.host')
.option('-q, --quiet', 'Suppress verbose output from the React Native packager.')
.option('-s, --send-to [dest]', 'A phone number or e-mail address to send a link to')
.option('-c, --clear', 'Clear the React Native packager cache')
.option(
'-c --release-channel <release channel>',
"The release channel to publish to. Default is 'default'.",
Expand Down

0 comments on commit 704659e

Please sign in to comment.