-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
esm webpack build is not getting generated #295
Comments
If anyone who looking got questions about the structure of the project and commands to use, it should be already in the readme. For more information you can take a look at https://cdmbase.github.io/cdebase-wiki/docs/contributing/source-code-organization |
With all our testing, we getting
|
need to test with https://github.com/whoisYeshua/webpack-simple-boilerplate |
webpack-node_externals causing to add Commonjs |
The above change help to replace
|
In which files are you getting that error? |
We removed |
You can try, something like this: |
I was trying to install packages |
Check this code: https://github.com/zakirhossen23/wave-data-celo/blob/main/wavedata-api/pages/api/GET/getFhir.js without .mjs |
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 tocommonjs
usingesm'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
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
package.json
it errors as it complains the generated bundle hasrequire
The text was updated successfully, but these errors were encountered: