no refs
- since portal script is loaded with `crossorigin:anonymous` now, we need to pass in the access control headers for script to bypass cors check
no refs
- adds `access-control-allow-origin: *` headers for dev mode
- portal script will be loaded with `cross-origin=anonymous`, access control header is needed to allow script to load
- mimics unpkg which already adds `access-control-allow-origin: *`
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
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.
no refs
The new dev script allows running `yarn dev` on the Portal code to make Portal development easier as well as integrate more easily with Ghost config. The script runs a local development server that serves portal bundle, which allows for static `portal` config to be used in Ghost for pointing to Portal script. It also watches the files for any changes, and auto re-builds and bundles latest Portal code.
no issue
By default, CRAs build process creates chunked script files and adds them to default index.html. The updated build process uses `rewire` and `webpack` to -
- Tweak CRAs default behavior by switching off chunking, which leads to a single script
- Uses webpack locally to combine JS and CSS built by above step into a single `bundle.min.js`