File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
code/frameworks/nextjs/src Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -4,18 +4,18 @@ import { fileURLToPath } from 'node:url';
4
4
5
5
import { getProjectRoot } from 'storybook/internal/common' ;
6
6
7
+ import { WebpackDefinePlugin } from '@storybook/builder-webpack5' ;
8
+
7
9
import type { NextConfig } from 'next' ;
8
10
import { PHASE_DEVELOPMENT_SERVER } from 'next/constants.js' ;
9
11
import nextJsLoadConfigModule from 'next/dist/server/config.js' ;
10
- import webpack from 'webpack' ;
11
12
import type { Configuration as WebpackConfig } from 'webpack' ;
12
13
13
14
import { resolvePackageDir } from '../../../core/src/shared/utils/module' ;
14
15
15
16
export const configureRuntimeNextjsVersionResolution = ( baseConfig : WebpackConfig ) : void => {
16
- const { DefinePlugin } = webpack ;
17
17
baseConfig . plugins ?. push (
18
- new DefinePlugin ( {
18
+ new WebpackDefinePlugin ( {
19
19
'process.env.__NEXT_VERSION' : JSON . stringify ( getNextjsVersion ( ) ) ,
20
20
} )
21
21
) ;
You can’t perform that action at this time.
0 commit comments