From 524be02b740a5c2fc20551ad7028ed8516c3ee57 Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Sat, 2 Apr 2022 16:47:38 +0200 Subject: [PATCH] docs(docs): document the use of AliasPlugin for theme resolution --- website/.storybook/main.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/website/.storybook/main.js b/website/.storybook/main.js index 87d3dd1406..a80e92f0a6 100644 --- a/website/.storybook/main.js +++ b/website/.storybook/main.js @@ -31,6 +31,18 @@ module.exports = { ); config.resolve.plugins = [ + // add a "layered" approach to theme resolution that matches + // Docusaurus' theme resolution: + // https://docusaurus.io/docs/2.0.0-beta.17/advanced/client#theme-aliases + // + // First, check to see if the referenced component has + // been swizzled and exists in `../src/theme`. + // + // If it's not there, check the `theme-classic/lib-next/theme` directory in + // `node_modules`. + // + // Finally, if it's not found anywhere else, check the + // `theme-fallback` directory. new AliasPlugin( 'described-resolve', [