mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-16 05:03:11 +08:00
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:
commit
fdec40cd19
@ -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;
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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 {};
|
||||
|
@ -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 {};
|
||||
|
@ -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[];
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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 {};
|
||||
|
@ -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 {};
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user