mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-06 15:31:16 +08:00
Addon Test: Adjust file exports to be ESM/CJS compatible
This commit is contained in:
parent
d7d464410c
commit
bddd5b0955
@ -1 +1 @@
|
||||
import './dist/manager';
|
||||
require('./dist/manager');
|
||||
|
1
code/addons/test/manager.mjs
Normal file
1
code/addons/test/manager.mjs
Normal file
@ -0,0 +1 @@
|
||||
import './dist/manager';
|
@ -1 +0,0 @@
|
||||
module.exports = require('./dist/postinstall.cjs');
|
1
code/addons/test/postinstall.js
Normal file
1
code/addons/test/postinstall.js
Normal file
@ -0,0 +1 @@
|
||||
module.exports = require('./dist/postinstall');
|
1
code/addons/test/postinstall.mjs
Normal file
1
code/addons/test/postinstall.mjs
Normal file
@ -0,0 +1 @@
|
||||
export * from './dist/postinstall.mjs';
|
@ -1,3 +0,0 @@
|
||||
module.exports = {
|
||||
...require('./dist/preset.cjs'),
|
||||
};
|
@ -1,10 +1 @@
|
||||
const { checkActionsLoaded } = require('./dist/preset');
|
||||
|
||||
function previewAnnotations(entry = [], options) {
|
||||
checkActionsLoaded(options.configDir);
|
||||
return entry;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
previewAnnotations,
|
||||
};
|
||||
module.exports = require('./dist/preset');
|
||||
|
1
code/addons/test/preset.mjs
Normal file
1
code/addons/test/preset.mjs
Normal file
@ -0,0 +1 @@
|
||||
export * from './dist/preset.mjs';
|
Loading…
x
Reference in New Issue
Block a user