Merge pull request #21421 from storybookjs/tom/21340-remove-old-module-hot-decline

Core: Remove pointless `module.hot.decline()` in addons
This commit is contained in:
Norbert de Langen 2023-03-06 13:09:58 +01:00 committed by GitHub
commit fdec40cd19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 0 additions and 62 deletions

View File

@ -1,5 +1,3 @@
/// <reference types="webpack-env" />
import { global } from '@storybook/global';
import { addons } from '@storybook/preview-api';
import { EVENTS } from './constants';
@ -7,10 +5,6 @@ import type { A11yParameters } from './params';
const { document, window: globalWindow } = global;
if (module && module.hot && module.hot.decline) {
module.hot.decline();
}
const channel = addons.getChannel();
// Holds axe core running state
let active = false;

View File

@ -1,8 +1,2 @@
/// <reference types="webpack-env" />
export { PARAM_KEY } from './constants';
export * from './params';
if (module && module.hot && module.hot.decline) {
module.hot.decline();
}

View File

@ -1,9 +1,3 @@
/// <reference types="webpack-env" />
export * from './constants';
export * from './models';
export * from './runtime';
if (module && module.hot && module.hot.decline) {
module.hot.decline();
}

View File

@ -1,8 +1,2 @@
/// <reference types="webpack-env" />
if (module && module.hot && module.hot.decline) {
module.hot.decline();
}
// make it work with --isolatedModules
export default {};

View File

@ -1,8 +1,4 @@
export { HIGHLIGHT, RESET_HIGHLIGHT } from './constants';
if (module && module.hot && module.hot.decline) {
module.hot.decline();
}
// make it work with --isolatedModules
export default {};

View File

@ -20,10 +20,6 @@ export const highlightObject = (color: string) => ({
boxShadow: '0 0 0 6px rgba(255,255,255,0.6)',
});
if (module && module.hot && module.hot.decline) {
module.hot.decline();
}
interface HighlightInfo {
/** html selector of the element */
elements: string[];

View File

@ -1,5 +1,3 @@
/// <reference types="webpack-env" />
import { addons } from '@storybook/preview-api';
import { normalize, sep } from 'upath';
import { ADD_TESTS, defineJestParameter } from './shared';
@ -62,7 +60,3 @@ export const withTests = (userOptions: { results: any; filesExt?: string }) => {
return storyFn();
};
};
if (module && module.hot && module.hot.decline) {
module.hot.decline();
}

View File

@ -1,5 +1,3 @@
/// <reference types="webpack-env" />
import { dedent } from 'ts-dedent';
let hasWarned = false;
@ -20,7 +18,3 @@ export function LinkTo(): null {
}
export { linkTo, hrefTo, withLinks, navigate } from './utils';
if (module && module.hot && module.hot.decline) {
module.hot.decline();
}

View File

@ -1,8 +1,2 @@
/// <reference types="webpack-env" />
if (module && module.hot && module.hot.decline) {
module.hot.decline();
}
// make it work with --isolatedModules
export default {};

View File

@ -1,8 +1,2 @@
/// <reference types="webpack-env" />
if (module && module.hot && module.hot.decline) {
module.hot.decline();
}
// make it work with --isolatedModules
export default {};

View File

@ -1,9 +1,3 @@
/// <reference types="webpack-env" />
import { ADDON_ID, PANEL_ID } from './events';
export { ADDON_ID, PANEL_ID };
if (module && module.hot && module.hot.decline) {
module.hot.decline();
}