Added --https option to test Lexical in Safari in https

no issue

Safari doesn't allow to load non-https scripts in a https environment, so we need to load Lexical from https using a Caddy proxy. This adds the `--https` option to `yarn dev --lexical`.

Might consider to somehow include a caddyfile somehow in the repo to make this work everywhere without changes.
This commit is contained in:
Simon Backx 2023-06-23 10:47:35 +02:00
parent 710d2143c2
commit b8d071e223

13
.github/dev.js vendored
View File

@ -134,7 +134,18 @@ if (DASH_DASH_ARGS.includes('search') || DASH_DASH_ARGS.includes('all')) {
}
if (DASH_DASH_ARGS.includes('lexical')) {
COMMAND_GHOST.env['editor__url'] = 'http://localhost:4173/koenig-lexical.umd.js';
if (DASH_DASH_ARGS.includes('https')) {
// Safari needs HTTPS for it to work
// To make this work, you'll need a CADDY server running in front
// Note the port is different because of this extra layer. Use the following Caddyfile:
// https://localhost:4174 {
// reverse_proxy 127.0.0.1:4173
// }
COMMAND_GHOST.env['editor__url'] = 'https://localhost:4174/koenig-lexical.umd.js';
} else {
COMMAND_GHOST.env['editor__url'] = 'http://localhost:4173/koenig-lexical.umd.js';
}
}
if (DASH_DASH_ARGS.includes('comments') || DASH_DASH_ARGS.includes('all')) {