diff --git a/lib/core/src/server/manager/manager-webpack.config.js b/lib/core/src/server/manager/manager-webpack.config.js
index <HASH>..<HASH> 100644
--- a/lib/core/src/server/manager/manager-webpack.config.js
+++ b/lib/core/src/server/manager/manager-webpack.config.js
@@ -10,7 +10,7 @@ import { version } from '../../../package.json';
 import { getManagerHeadHtml } from '../utils/template';
 import { loadEnv, getBabelRuntimePath } from '../config/utils';
 
-const r = require.resolve('@storybook/core/package.json').replace('package.json', '');
+const coreDirName = path.dirname(require.resolve('@storybook/core/package.json'));
 const context = path.join(r, '../../node_modules');
 const cacheDir = findCacheDir({ name: 'storybook' });
Update lib/core/src/server/manager/manager-webpack.config.js