change addon-measure to new preview.js structure

This commit is contained in:
Michael Shilman 2022-03-18 20:35:25 +08:00
parent 3de6aa7d82
commit 09ef0ebd1f
5 changed files with 9 additions and 15 deletions

View File

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

View File

@ -1,12 +0,0 @@
function config(entry = []) {
return [...entry, require.resolve('./dist/esm/preset/addDecorator')];
}
function managerEntries(entry = [], options) {
return [...entry, require.resolve('./dist/esm/manager')];
}
module.exports = {
managerEntries,
config,
};

View File

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

View File

@ -1 +1,5 @@
require('./dist/esm/manager');
require('@storybook/client-logger').once.warn(
'register.js is deprecated see https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-registerjs'
);
require('./manager');

View File

@ -1,5 +1,5 @@
import { withMeasure } from '../withMeasure';
import { PARAM_KEY } from '../constants';
import { withMeasure } from './withMeasure';
import { PARAM_KEY } from './constants';
export const decorators = [withMeasure];