Commit Graph

6 Commits

Author SHA1 Message Date
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
Rish
1868542504 Updated webpack config to cleanup warnings
no refs

`yarn build` used to throw up a lot of warnings because the webpack config was not correctly updated to use performance config for portal's usecase, this change -

- Sets the `mode` to explicit `production` instead of implicit which throws a warning
- Updated performance max* sizes to account for a single portal chunk bundled up as an external script
2021-03-04 01:19:56 +05:30
Rish
8db1b02558 Updated npm/unpkg name to portal
no issue

- Updates npm/unpkg name to portal from members-js
- Updates script name from `members.min.js` -> `portal.min.js`
2020-09-23 23:43:46 +05:30
Rish
028139a0e1 Updated build and publish setup for unpkg deployment
refs https://github.com/TryGhost/members.js/issues/12

- Updates package name and add umd/unpkg setup in `package.json`
- Updated webpack config to publish minified bundle at `umd/memebrs.min.js`
- Updated .gitignore to remove build folders
2020-04-20 22:10:58 +05:30
Rish
89a1cab4c1 Fixed lint for webpack config
no issue
2020-04-20 11:57:14 +05:30
Rish
c23a80e6f0 Updated build process for single minified script
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`
2020-03-24 18:49:04 +05:30