storybook/lib/ui/paths.js
Tom Coleman 66509ab947 REMOVE react[-dom] as a peer dependency of @storybook/core
Instead we pass the FS location of the react[-dom] version that @storybook/ui wants to use into the manager webpack config directly.
2018-12-19 20:37:14 +11:00

9 lines
354 B
JavaScript

const { dirname } = require('path');
// These paths need to be aliased in the manager webpack config to ensure that all
// code running inside the manager uses the *same* version of react[-dom] that we use.
module.exports = {
react: dirname(require.resolve('react/package.json')),
'react-dom': dirname(require.resolve('react-dom/package.json')),
};