Commit Graph

6 Commits

Author SHA1 Message Date
Rishabh
8d5f5febaa Added access control headers in dev mode
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: *`
2021-06-22 12:16:49 +05:30
Rishabh
6e2952901a Updated Portal build script to use rewired webpack config
no issues

- updates Portal build script to use rewired react-scripts config
- updated config handles css embed as well as output location/name for portal bundle as part of cra build
- makes extra webpack bundling redundant for now
- updates dev mode to map the portal source map useful for testing build version locally
- updates custom webpack config with copy plugin for future use

refs -
https://github.com/facebook/create-react-app/issues/5306#issuecomment-603772477
https://gist.github.com/phdesign/3fd306db2bc53f6368e6f0f73bbeff19
2021-06-16 20:58:44 +05:30
Rishabh
7c5cb61ee5 Updated Ghost config URL for dev mode script
no refs

- updates portal url for Ghost config to use a dynamic URL to work same as start mode script
2021-06-16 20:58:44 +05:30
Rishabh
a4afeba183 Updated dev mode script to serve on static URL
no refs

- adds static serve path for portal dev mode script same as start mode
2021-06-11 19:55:43 +05:30
Rishabh
f0ba337659 Cleaned dev mode script
no refs

Cleans up dev mode script for lint errors
2021-06-10 15:05:33 +05:30
Rishabh
0b2af14567 Added dev script for Portal development
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.
2021-06-07 14:22:31 +05:30