Make @ndelangen's changes

This commit is contained in:
Tom Coleman 2023-02-23 21:19:00 +11:00
parent 0bd3c1fce6
commit 63051f926e
6 changed files with 12 additions and 14 deletions

View File

@ -2,7 +2,6 @@ import fs from 'fs-extra';
import remarkSlug from 'remark-slug';
import remarkExternalLinks from 'remark-external-links';
import { dedent } from 'ts-dedent';
import { dirname } from 'path';
import type {
IndexerOptions,
@ -161,7 +160,7 @@ const docs = (docsOptions: DocsOptions) => {
};
export const addons: StorybookConfig['addons'] = [
dirname(require.resolve('@storybook/react-dom-shim/package.json')),
require.resolve('@storybook/react-dom-shim/dist/preset'),
];
/*

View File

@ -22,12 +22,12 @@
"sideEffects": false,
"exports": {
".": {
"node": "./dist/index.js",
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
"node": "./dist/react-16.js",
"require": "./dist/react-16.js",
"import": "./dist/react-16.mjs",
"types": "./dist/react-16.d.ts"
},
"./react-18": {
"./dist/react-18": {
"node": "./dist/react-18.js",
"require": "./dist/react-18.js",
"import": "./dist/react-18.mjs",
@ -40,9 +40,9 @@
},
"./package.json": "./package.json"
},
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"main": "dist/react-16.js",
"module": "dist/react-16.mjs",
"types": "dist/react-16.d.ts",
"files": [
"dist/**/*",
"README.md",
@ -66,7 +66,7 @@
"bundler": {
"entries": [
"./src/preset.ts",
"./src/index.tsx",
"./src/react-16.tsx",
"./src/react-18.tsx"
]
},

View File

@ -1 +0,0 @@
module.exports = require('./dist/preset');

View File

@ -1,6 +1,5 @@
import type { StorybookConfig } from '@storybook/types';
export const addons: StorybookConfig['addons'] = [
// Can't use path in this file due to be compiled for browser, this is a workaround
require.resolve('@storybook/react-dom-shim/package.json').replace('package.json', ''),
require.resolve('@storybook/react-dom-shim/dist/preset'),
];

View File

@ -4647,6 +4647,7 @@ __metadata:
"@storybook/node-logger": 7.0.0-beta.53
"@storybook/postinstall": 7.0.0-beta.53
"@storybook/preview-api": 7.0.0-beta.53
"@storybook/react-dom-shim": 7.0.0-beta.53
"@storybook/theming": 7.0.0-beta.53
"@storybook/types": 7.0.0-beta.53
fs-extra: ^11.1.0