Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
a546b131
Unverified
Commit
a546b131
authored
Jul 09, 2025
by
Rob Pruzan
Committed by
GitHub
Jul 09, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: referencing unavailable __dirname (#81436)
Patch missing __dirname usage for storybook css injection
parent
94f8aecf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
main.ts
packages/next/.storybook/main.ts
+3
-1
No files found.
packages/next/.storybook/main.ts
View file @
a546b131
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'
),
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment