Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/template extensibility (#1162)
* initial work on moving code to use resolver * fix getoverridepath and break on ^ imports * add todos and comments * rewrite requestcontext.request for path with caret * perform overrideshashmap lookup for relative import * progress * progress * regenerate lock files * fix dupe useToast * progress on making `charles-solution` work * initial pass at migration to `resolver.getHook('resolve').tapAsync` working, TODO next... cleanup * restore icons file and add extensible text to home * add some comments and construct hashmap in new plugin * working glob sync lookup?? * resolve lookup when there is no extension * add component slot for testing * fix some lookup errors * cleanup * rewrite requests coming from underlying template * cleanup * rename plugin file * remove unnecessary build files * rename to overrides * fix lookup errors * fix some broken upstream changes, eslint fixes * Bring back the deleted package.json * Install new eslint plugin * No more relative imports in retail-react-app * Create .prettierrc.yaml * restore other deleted package lockfiles * fix some eslint issues * remove `^` imports and begin migrating logic away from previous API. TODO: get webpack to resolve `retail-react-app` base import path from within `template-retail-react-app` * short circuit plugin temporarily, get webpack `alias` working for template to resolve self-referencing `retail-react-app` imports * fix unreachable condition * wow... freaking works 🚀 * cleanup, get `template-retail-react-app` working again * cleanup * Create .eslintrc.js * fix routes.jsx which no longer pulled relative template * make routes.jsx more concise * update lockfiles * add jsconfig.json for IDEs to have magic `retail-react-app` be discoverable * more cleanup * change package.json key from `mobify` => `ccExtensibility` * cleanup * Final cleanup, remove console.logs, make `extendable` dynamic for internal file resolution in `template-retail-react-app` (and future projects), remove some non-required files, * fix straggler non-dynamic filepath * cleanup * remove code that shouldn't be in v3+ * sync package.json deps in extended example project * cleanup / pr feedback * pr feedback, great catch @kevinxh * fix problem with bad copy from underlying template file * pr feedback / cleanup * cleanup Co-authored-by: Kevin He <[email protected]> * Update package-lock.json * WIP * drop unneeded complexity * lockfiles * moving toward an array of `alias`es * Refactor template extensibility functionality to use `resolve.alias` + greatly reduce code footprint + make leading slash optional in `ccExtensibility.overridesDir` * add brand-logo with no clash for server side viewBox * add `request-processor.js` (required for worker.js to load) and fix bad extensibility path loading in `build-dev-server.js` * lint fix * fix failing pwa-kit-react-sdk tests * cleanup * lint:fix * fix failing tests in CI re: `TextDecoder is not defined` * take 2 attempting to fix TextDecoder global in jest * fix jest module mapper * fix jest moduleMapper config * REALLY fix jest moduleNameMapper config for new pathing + fix node `util` global TextDecoder is not defined in jest * add brand-logo * remove previously added `AbovePDP` Template Hook component * replay #1128 from bad merge * eslint:fix for `retail-react-app` base paths * de-duplicate deps in bundle * fix path defaulting, don't pass nullish value to path.resolve * improve pathing for overridesDir in pwa-kit-dev webapack config + add missing worker/main.js * fix pathing * fix pathing issue that was mysteriously UNFIXED * fix `worker.js` path * fix app/static pathing in non-extensible builds * [Extensibility] Remove Einstein proxy and send Einstein events directly from app (#1202) * Remove Einstein proxy and send Einstein events directly from app * Update ssrParameters * Replace ExtendsCircularImportsPlugin with OverridesResolverPlugin (#1211) * Replace ExtendsCircularImportsPlugin with OverridesResolverPlugin * fix filepath problem --------- Co-authored-by: Brian Feister <[email protected]> * remove irrelevant bundlesize check to pass CI * Fix `vendor.js` inclusion of `retail-react-app` files (#1198) * fix duplicate lilbs in bundle * fix app/static pathing for non-extensible builds * oof, fix extensible app/static filepaths * Resolve conflicting npm deps via `resolve.alias` * add missing worker/main.js * cleanup unused imports * WIP, add list of original overridable deps * prevent template extensibility vendor.js from treating baseline route files as deps in vendor.js * fix irrelevant bundlesize declaration to pass CI * drop test:max-file-size test from my-extended-retail-app * replace relative with absolute path fetchTranslations (#1215) Co-authored-by: Brian Feister <[email protected]> * Refactor for unit testing, fix pathing issue from old version of file parsing algoritihim * fix merge conflict resolution * remove template extensible demo in prep for @bendvc's pr for generator work * regen lockfiles for react 18 changes * fix linting --------- Co-authored-by: yunakim714 <[email protected]> Co-authored-by: Vincent Marta <[email protected]> Co-authored-by: Kevin He <[email protected]> Co-authored-by: vcua-mobify <[email protected]> Co-authored-by: vcua-mobify <[email protected]> Co-authored-by: Alex Vuong <[email protected]> Co-authored-by: Alex Vuong <[email protected]>
- Loading branch information