You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our develop branch which currently working uses esm. The reason we need to use this esm wrapper (you can check in develop branch when you run webpack build there is index.js file wrapping with esm) is for nodejs to support esm package converting to commonjs using esm's require. Webpack for server side won't bundle node_module packages as we exclude here
Our purpose is to generate esm build using webpack (which means there shouldn't be require commonjs functions used in the generated build). In our test we used this branch, we commented the browser bundle for the time being.
The frontend webpack build can be triggered using the following command. Prior to it, you need to finish yarn && yarn build
Since the webpack config, is not generating ESM bundle, if we start node by putting type: module in frontend-server's package.json it errors as it complains the generated bundle has require
Our
developbranch which currently working uses esm. The reason we need to use this esm wrapper (you can check in develop branch when you run webpack build there is index.js file wrapping with esm) is for nodejs to support esm package converting tocommonjsusingesm's require. Webpack for server side won't bundle node_module packages as we exclude hereFor nodejs 16 supports ESM but with few restrictions.
Our purpose is to generate esm build using webpack (which means there shouldn't be
requirecommonjs functions used in the generated build). In our test we used this branch, we commented the browser bundle for the time being.The frontend webpack build can be triggered using the following command. Prior to it, you need to finish
yarn && yarn buildpackage.jsonit errors as it complains the generated bundle hasrequire