Skip to content

Commit 51b9797

Browse files
authored
fix(rollup-plugin): module is not defined in ES module scope (#5267)
1 parent 1f08a89 commit 51b9797

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/@lwc/rollup-plugin/src/index.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -391,4 +391,6 @@ export default function lwc(pluginOptions: RollupLwcOptions = {}): Plugin {
391391
}
392392

393393
// For backward compatibility with commonjs format
394-
module.exports = lwc;
394+
if (typeof module !== 'undefined') {
395+
module.exports = lwc;
396+
}

0 commit comments

Comments
 (0)