Skip to content

Commit

Permalink
chore(codespaces): add codespaces support in dev
Browse files Browse the repository at this point in the history
  • Loading branch information
lyngai authored May 23, 2022
1 parent 404fed0 commit bd1d10a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions build/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ const options = {
},
};

/**
* CODESPACES is always 'true' in github codespaces
*
* @see https://docs.github.com/en/codespaces/developing-in-codespaces/default-environment-variables-for-your-codespace
*/
if (process.env.CODESPACES === 'true') {
// a hack for rollup-plugin-livereload's websocket connection
process.env.CODESANDBOX_SSE = 'true';
}

if (enableHotReload) {
options.plugins = options.plugins.concat([
serve({
Expand Down

0 comments on commit bd1d10a

Please sign in to comment.