From 2373a51ee4ac450b021df45933aa36628ffa1b54 Mon Sep 17 00:00:00 2001 From: Michael Barrett Date: Tue, 3 Oct 2023 16:49:05 +0100 Subject: [PATCH] Fixed storybook failing to load due `@tryghost/nql` usage (#18453) no refs storybook was failing to load due to `@tryghost/nql` usage and the global `vite` config not being used --- apps/admin-x-settings/.storybook/main.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/admin-x-settings/.storybook/main.tsx b/apps/admin-x-settings/.storybook/main.tsx index 23facc7c95..c80dfe7b94 100644 --- a/apps/admin-x-settings/.storybook/main.tsx +++ b/apps/admin-x-settings/.storybook/main.tsx @@ -1,3 +1,4 @@ +import {resolve} from "path"; import type { StorybookConfig } from "@storybook/react-vite"; const config: StorybookConfig = { stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"], @@ -20,6 +21,8 @@ const config: StorybookConfig = { async viteFinal(config, options) { config.resolve.alias = { crypto: require.resolve('rollup-plugin-node-builtins'), + // @TODO: Remove this when @tryghost/nql is updated + mingo: resolve(__dirname, '../../../node_modules/mingo/dist/mingo.js') } return config; },