Skip to content

Commit bb1e72c

Browse files
author
Robert Jackson
committed
Ensure the real plugin's static methods are invoked
1 parent 237a61f commit bb1e72c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cjs-wrapper.cjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
let RealPlugin;
33

44
module.exports = class FakeCJSWrapperPlugin {
5-
static async isEnabled() {
5+
static async isEnabled(...args) {
66
// we use the async of this method to enable us to absorb the dynamic
77
// import statement
88

@@ -14,6 +14,12 @@ module.exports = class FakeCJSWrapperPlugin {
1414
// eslint-disable-next-line node/no-unsupported-features/es-syntax
1515
let RealPluginModule = await import('./index.js');
1616
RealPlugin = RealPluginModule.default;
17+
18+
return RealPlugin.isEnabled(...args);
19+
}
20+
21+
static disablePlugin(...args) {
22+
return RealPlugin.disablePlugin(...args);
1723
}
1824

1925
constructor(...args) {

0 commit comments

Comments
 (0)