Ghost/ghost/portal/scripts/load-portal.js
Rishabh 47c6509bea Added experimental start mode script for local development
no refs

Adds a new `yarn start:dev` command to start portal in development mode that allows development script to be used directly on Ghost site without needing a build for each change. Allows faster development on Portal locally.
2021-06-10 15:05:08 +05:30

12 lines
446 B
JavaScript

/** Script to load live Portal script chunks for local development */
function loadScript(src) {
var script = document.createElement('script');
script.src = src;
document.head.appendChild(script);
}
loadScript('http://localhost:3000/static/js/bundle.js');
loadScript('http://localhost:3000/static/js/1.chunk.js');
loadScript('http://localhost:3000/static/js/0.chunk.js');
loadScript('http://localhost:3000/static/js/main.chunk.js');