-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
- Loading branch information
Showing
5 changed files
with
175 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,91 @@ | ||
{ | ||
"name": "my-extended-retail-app", | ||
"version": "2.8.0-dev", | ||
"license": "See license in LICENSE", | ||
"engines": { | ||
"node": "^16.0.0 || ^18.0.0", | ||
"npm": "^7.0.0 || ^8.0.0 || ^9.0.0" | ||
}, | ||
"ccExtensibility": { | ||
"extends": "retail-react-app", | ||
"overridesDir": "pwa-kit-overrides" | ||
}, | ||
"devDependencies": { | ||
"@chakra-ui/icons": "^1.1.7", | ||
"@chakra-ui/react": "^1.8.9", | ||
"@chakra-ui/skip-nav": "^1.2.6", | ||
"@chakra-ui/system": "^1.12.1", | ||
"@emotion/react": "^11.10.6", | ||
"@emotion/styled": "^11.10.6", | ||
"@formatjs/cli": "^6.0.4", | ||
"@lhci/cli": "^0.11.0", | ||
"@loadable/component": "^5.15.3", | ||
"@peculiar/webcrypto": "^1.4.2", | ||
"@tanstack/react-query": "^4.0.10", | ||
"@tanstack/react-query-devtools": "^4.29.1", | ||
"@testing-library/dom": "^9.0.1", | ||
"@testing-library/jest-dom": "^5.16.5", | ||
"@testing-library/react": "^11.2.7", | ||
"@testing-library/react-hooks": "^7.0.2", | ||
"@testing-library/user-event": "^12.8.3", | ||
"base64-arraybuffer": "^0.2.0", | ||
"bundlesize2": "^0.0.31", | ||
"card-validator": "^8.1.1", | ||
"commerce-sdk-react-preview": "^2.8.0-dev", | ||
"cross-env": "^5.2.1", | ||
"cross-fetch": "^3.1.5", | ||
"focus-visible": "^5.2.0", | ||
"framer-motion": "^3.10.6", | ||
"full-icu": "^1.5.0", | ||
"helmet": "^4.6.0", | ||
"jest-fetch-mock": "^2.1.2", | ||
"js-cookie": "^3.0.1", | ||
"jsonwebtoken": "^9.0.0", | ||
"jwt-decode": "^3.1.2", | ||
"lodash": "^4.17.21", | ||
"msw": "^1.2.1", | ||
"nanoid": "^3.3.4", | ||
"njwt": "^1.2.0", | ||
"prop-types": "^15.8.1", | ||
"pwa-kit-dev": "2.8.0-dev", | ||
"pwa-kit-react-sdk": "2.8.0-dev", | ||
"pwa-kit-runtime": "2.8.0-dev", | ||
"query-string": "^7.1.3", | ||
"raf": "^3.4.1", | ||
"randomstring": "^1.2.3", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", | ||
"react-helmet": "^6.1.0", | ||
"react-hook-form": "^6.15.8", | ||
"react-intl": "^5.25.1", | ||
"react-router-dom": "^5.3.4", | ||
"retail-react-app": "2.8.0-dev" | ||
}, | ||
"peerDependencies": { | ||
"@chakra-ui/system": "^1.12.1" | ||
}, | ||
"scripts": { | ||
"analyze-build": "cross-env MOBIFY_ANALYZE=true npm run build", | ||
"build-translations": "npm run extract-default-translations && npm run compile-translations", | ||
"compile-translations": "formatjs compile-folder --ast app/translations app/translations/compiled", | ||
"compile-translations:pseudo": "formatjs compile --ast app/translations/en-US.json --out-file app/translations/compiled/en-XB.json --pseudo-locale en-XB", | ||
"extract-default-translations": "formatjs extract 'app/**/*.{js,jsx}' --out-file app/translations/en-US.json --id-interpolation-pattern [sha512:contenthash:base64:6]", | ||
"format": "pwa-kit-dev format \"**/*.{js,jsx}\"", | ||
"lint": "pwa-kit-dev lint \"**/*.{js,jsx}\"", | ||
"lint:fix": "npm run lint -- --fix", | ||
"build": "npm run build-translations && pwa-kit-dev build", | ||
"push": "npm run build && pwa-kit-dev push", | ||
"save-credentials": "pwa-kit-dev save-credentials", | ||
"start": "cross-env NODE_ICU_DATA=node_modules/full-icu pwa-kit-dev start", | ||
"start:inspect": "npm run start -- --inspect", | ||
"start:pseudolocale": "npm run extract-default-translations && npm run compile-translations:pseudo && cross-env USE_PSEUDOLOCALE=true npm run start", | ||
"tail-logs": "pwa-kit-dev tail-logs", | ||
"test": "pwa-kit-dev test", | ||
"test:lighthouse": "cross-env NODE_ENV=production lhci autorun --config=tests/lighthouserc.js", | ||
"test:max-file-size": "npm run build && bundlesize" | ||
}, | ||
"browserslist": [ | ||
"iOS >= 9.0", | ||
"Android >= 4.4.4", | ||
"last 4 ChromeAndroid versions" | ||
] | ||
"name": "my-extended-retail-app", | ||
"version": "2.8.0-dev", | ||
"license": "See license in LICENSE", | ||
"engines": { | ||
"node": "^16.0.0 || ^18.0.0", | ||
"npm": "^7.0.0 || ^8.0.0 || ^9.0.0" | ||
}, | ||
"ccExtensibility": { | ||
"extends": "retail-react-app", | ||
"overridesDir": "pwa-kit-overrides" | ||
}, | ||
"devDependencies": { | ||
"@chakra-ui/icons": "^1.1.7", | ||
"@chakra-ui/react": "^1.8.9", | ||
"@chakra-ui/skip-nav": "^1.2.6", | ||
"@chakra-ui/system": "^1.12.1", | ||
"@emotion/react": "^11.10.6", | ||
"@emotion/styled": "^11.10.6", | ||
"@formatjs/cli": "^6.0.4", | ||
"@lhci/cli": "^0.11.0", | ||
"@loadable/component": "^5.15.3", | ||
"@peculiar/webcrypto": "^1.4.2", | ||
"@tanstack/react-query": "^4.0.10", | ||
"@tanstack/react-query-devtools": "^4.29.1", | ||
"@testing-library/dom": "^9.0.1", | ||
"@testing-library/jest-dom": "^5.16.5", | ||
"@testing-library/react": "^11.2.7", | ||
"@testing-library/react-hooks": "^7.0.2", | ||
"@testing-library/user-event": "^12.8.3", | ||
"base64-arraybuffer": "^0.2.0", | ||
"bundlesize2": "^0.0.31", | ||
"card-validator": "^8.1.1", | ||
"commerce-sdk-react-preview": "^2.8.0-dev", | ||
"cross-env": "^5.2.1", | ||
"cross-fetch": "^3.1.5", | ||
"focus-visible": "^5.2.0", | ||
"framer-motion": "^3.10.6", | ||
"full-icu": "^1.5.0", | ||
"helmet": "^4.6.0", | ||
"jest-fetch-mock": "^2.1.2", | ||
"js-cookie": "^3.0.1", | ||
"jsonwebtoken": "^9.0.0", | ||
"jwt-decode": "^3.1.2", | ||
"lodash": "^4.17.21", | ||
"msw": "^1.2.1", | ||
"nanoid": "^3.3.4", | ||
"njwt": "^1.2.0", | ||
"prop-types": "^15.8.1", | ||
"pwa-kit-dev": "2.8.0-dev", | ||
"pwa-kit-react-sdk": "2.8.0-dev", | ||
"pwa-kit-runtime": "2.8.0-dev", | ||
"query-string": "^7.1.3", | ||
"raf": "^3.4.1", | ||
"randomstring": "^1.2.3", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", | ||
"react-helmet": "^6.1.0", | ||
"react-hook-form": "^6.15.8", | ||
"react-intl": "^5.25.1", | ||
"react-router-dom": "^5.3.4", | ||
"retail-react-app": "2.8.0-dev" | ||
}, | ||
"peerDependencies": { | ||
"@chakra-ui/system": "^1.12.1" | ||
}, | ||
"scripts": { | ||
"analyze-build": "cross-env MOBIFY_ANALYZE=true npm run build", | ||
"build-translations": "npm run extract-default-translations && npm run compile-translations", | ||
"compile-translations": "formatjs compile-folder --ast app/translations app/translations/compiled", | ||
"compile-translations:pseudo": "formatjs compile --ast app/translations/en-US.json --out-file app/translations/compiled/en-XB.json --pseudo-locale en-XB", | ||
"extract-default-translations": "formatjs extract 'app/**/*.{js,jsx}' --out-file app/translations/en-US.json --id-interpolation-pattern [sha512:contenthash:base64:6]", | ||
"format": "pwa-kit-dev format \"**/*.{js,jsx}\"", | ||
"lint": "pwa-kit-dev lint \"**/*.{js,jsx}\"", | ||
"lint:fix": "npm run lint -- --fix", | ||
"build": "npm run build-translations && pwa-kit-dev build", | ||
"push": "npm run build && pwa-kit-dev push", | ||
"save-credentials": "pwa-kit-dev save-credentials", | ||
"start": "cross-env NODE_ICU_DATA=node_modules/full-icu pwa-kit-dev start", | ||
"start:inspect": "npm run start -- --inspect", | ||
"start:pseudolocale": "npm run extract-default-translations && npm run compile-translations:pseudo && cross-env USE_PSEUDOLOCALE=true npm run start", | ||
"tail-logs": "pwa-kit-dev tail-logs", | ||
"test": "pwa-kit-dev test", | ||
"test:lighthouse": "cross-env NODE_ENV=production lhci autorun --config=tests/lighthouserc.js" | ||
}, | ||
"browserslist": [ | ||
"iOS >= 9.0", | ||
"Android >= 4.4.4", | ||
"last 4 ChromeAndroid versions" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright (c) 2023, salesforce.com, inc. | ||
* All rights reserved. | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause | ||
*/ | ||
|
||
/* global workbox, DEBUG */ | ||
/* istanbul ignore file */ | ||
/** | ||
* This is your project's Service Worker. For information on customizing your | ||
* Service Worker, see: | ||
* | ||
* - https://developers.google.com/web/fundamentals/primers/service-workers/ | ||
* - https://developers.google.com/web/tools/workbox/ | ||
*/ | ||
|
||
self.importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.6.1/workbox-sw.js') | ||
|
||
workbox.setConfig({debug: DEBUG}) | ||
|
||
// Place your Workbox route configurations here, eg: | ||
// workbox.routing.registerRoute(...) | ||
|
||
// Never cache dev-server internals. | ||
workbox.routing.registerRoute( | ||
/^http:\/\/localhost:3000\/__mrt/, | ||
new workbox.strategies.NetworkOnly() | ||
) | ||
|
||
// Minimum viable configuration to get offline mode. | ||
workbox.routing.registerRoute(/^http:\/\/localhost:3000/, new workbox.strategies.NetworkFirst()) | ||
workbox.routing.registerRoute( | ||
/^https:\/\/.+\.mobify-storefront.com/, | ||
new workbox.strategies.NetworkFirst() | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters