Unverified Commit a546b131 authored by Rob Pruzan's avatar Rob Pruzan Committed by GitHub

fix: referencing unavailable __dirname (#81436)

Patch missing __dirname usage for storybook css injection
parent 94f8aecf
import type { StorybookConfig } from '@storybook/react-webpack5'
import { join, dirname, resolve } from 'path'
import { fileURLToPath } from 'url'
/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
......@@ -65,7 +67,7 @@ const config: StorybookConfig = {
options: {
injectType: 'styleTag',
insert: resolve(
__dirname,
dirname(fileURLToPath(import.meta.url)),
'../src/build/webpack/loaders/devtool/devtool-style-inject.js'
),
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment