diff --git a/docs/src/pages/basics/writing-stories/index.md b/docs/src/pages/basics/writing-stories/index.md
index 1addd867004..24b90266841 100644
--- a/docs/src/pages/basics/writing-stories/index.md
+++ b/docs/src/pages/basics/writing-stories/index.md
@@ -154,7 +154,7 @@ import { storiesOf } from '@storybook/react';
import BaseButton from './BaseButton';
-const base = __dirname;
+const base = __dirname.replace(process.cwd(), '');
storiesOf(`Category|${base}/BaseButton`, module)
.add('story 1', () => )
diff --git a/examples/official-storybook/stories/__snapshots__/other-dirname.stories.storyshot b/examples/official-storybook/stories/__snapshots__/other-dirname.stories.storyshot
index 105b39e7b34..f3c3b28462e 100644
--- a/examples/official-storybook/stories/__snapshots__/other-dirname.stories.storyshot
+++ b/examples/official-storybook/stories/__snapshots__/other-dirname.stories.storyshot
@@ -1,12 +1,12 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`Storyshots Other|/Users/dev/Projects/GitHub/storybook/core/examples/official-storybook/stories/Dirname Example story 1 1`] = `
+exports[`Storyshots Other|/examples/official-storybook/stories/Dirname Example story 1 1`] = `
`;
-exports[`Storyshots Other|/Users/dev/Projects/GitHub/storybook/core/examples/official-storybook/stories/Dirname Example story 2 1`] = `
+exports[`Storyshots Other|/examples/official-storybook/stories/Dirname Example story 2 1`] = `
diff --git a/examples/official-storybook/stories/other-dirname.stories.js b/examples/official-storybook/stories/other-dirname.stories.js
index e004f216888..64eba2630f5 100644
--- a/examples/official-storybook/stories/other-dirname.stories.js
+++ b/examples/official-storybook/stories/other-dirname.stories.js
@@ -3,7 +3,7 @@ import { storiesOf } from '@storybook/react';
import BaseButton from '../components/BaseButton';
-const base = __dirname;
+const base = __dirname.replace(process.cwd(), '');
storiesOf(`Other|${base}/Dirname Example`, module)
.add('story 1', () => )
diff --git a/examples/official-storybook/webpack.config.js b/examples/official-storybook/webpack.config.js
index a883c3fa8f5..ee2f4c33c8d 100644
--- a/examples/official-storybook/webpack.config.js
+++ b/examples/official-storybook/webpack.config.js
@@ -2,7 +2,7 @@ const path = require('path');
module.exports = {
node: {
- __dirname: true,
+ __dirname: false,
},
module: {
rules: [