Ghost/ghost/portal/scripts/load-portal.js
Rishabh 885fe178dd Updated local start mode script
no issues

- adds new start-combined script which combines all chunks in `yarn start` for local portal development
- allows easier loading of local portal bundle in ghost via load-portal script, which needs to inject single script
- updates `yarn start:dev` to use updated script which uses the combined mode for better local development

refs
https://gist.github.com/simpixelated/90a3c16c3ed268fe24f5e5c9585ced2f
2021-06-16 20:58:44 +05:30

9 lines
257 B
JavaScript

/** Script to load Portal bundle 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');