From 8c8235cfcf841cc5029f79763faed98b2d46f316 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Tue, 20 Jun 2023 14:53:03 -0700 Subject: [PATCH] Use ES Module Export in `wrapAssembly.js` Summary: This is needed to make Webpack happy when bundling Yoga. Webpack assumes this is an ESModule after following it from the package.json export map. We are already importing this via default import. Reviewed By: GijsWeterings Differential Revision: D46811190 fbshipit-source-id: 7a074e5d2aa9c0cb4b59e506a0d910762a62dd58 --- javascript/src/wrapAssembly.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/javascript/src/wrapAssembly.js b/javascript/src/wrapAssembly.js index 0df42074..ff7c3654 100644 --- a/javascript/src/wrapAssembly.js +++ b/javascript/src/wrapAssembly.js @@ -9,7 +9,7 @@ import YGEnums, {Unit, Direction} from './generated/YGEnums'; -module.exports = lib => { +export default function wrapAssembly(lib) { function patch(prototype, name, fn) { const original = prototype[name]; @@ -143,4 +143,4 @@ module.exports = lib => { Node: lib.Node, ...YGEnums, }; -}; +}