Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Fix for storybook to ensure all components render #11465

Merged
merged 2 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 9 additions & 9 deletions assets/js/settings/blocks/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ export const WC_BLOCKS_IMAGE_URL = blocksConfig.pluginUrl + 'images/';
export const WC_BLOCKS_BUILD_URL = blocksConfig.pluginUrl + 'build/';
export const WC_BLOCKS_PHASE = blocksConfig.buildPhase;
export const SHOP_URL = STORE_PAGES.shop?.permalink;
export const CHECKOUT_PAGE_ID = STORE_PAGES.checkout.id;
export const CHECKOUT_URL = STORE_PAGES.checkout.permalink;
export const PRIVACY_URL = STORE_PAGES.privacy.permalink;
export const PRIVACY_PAGE_NAME = STORE_PAGES.privacy.title;
export const TERMS_URL = STORE_PAGES.terms.permalink;
export const TERMS_PAGE_NAME = STORE_PAGES.terms.title;
export const CART_PAGE_ID = STORE_PAGES.cart.id;
export const CART_URL = STORE_PAGES.cart.permalink;
export const LOGIN_URL = STORE_PAGES.myaccount.permalink
export const CHECKOUT_PAGE_ID = STORE_PAGES.checkout?.id;
export const CHECKOUT_URL = STORE_PAGES.checkout?.permalink;
export const PRIVACY_URL = STORE_PAGES.privacy?.permalink;
export const PRIVACY_PAGE_NAME = STORE_PAGES.privacy?.title;
export const TERMS_URL = STORE_PAGES.terms?.permalink;
export const TERMS_PAGE_NAME = STORE_PAGES.terms?.title;
export const CART_PAGE_ID = STORE_PAGES.cart?.id;
export const CART_URL = STORE_PAGES.cart?.permalink;
export const LOGIN_URL = STORE_PAGES.myaccount?.permalink
? STORE_PAGES.myaccount.permalink
: getSetting( 'wpLoginUrl', '/wp-login.php' );
export const LOCAL_PICKUP_ENABLED = getSetting< boolean >(
Expand Down
9 changes: 9 additions & 0 deletions storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,14 @@ module.exports = ( { config: storybookConfig } ) => {
} )
);

storybookConfig.module.rules = storybookConfig.module.rules.filter(
( rule ) =>
! (
rule.use &&
typeof rule.use.loader === 'string' &&
rule.use.loader.indexOf( 'babel-loader' ) >= 0
)
);

return storybookConfig;
};