Reproduce KintoneRestAPIClient.version causes an Error on browser environment
Issue: kintone/js-sdk#2111
Step to reproduce
cd
to this repo- Run
npm install
andnpm run build
- Start server by running
node server.js
- Open
http://localhost:3000
on browser - Check the console log of browser
- At this step, you will see an error
Uncaught ReferenceError: PACKAGE_VERSION is not defined
- At this step, you will see an error
- Checkout the fixed branch of js-sdk (kintone/js-sdk#2143)
cd
torest-api-client
package and runyarn build
- Run
yarn link
to create link package - Back to this repo
- Run
yarn link @kintone/rest-api-client
- Run
npm run build
- Refresh browser and check the console log again.
- At this step, you will see a log
4.0.0
(the version of rest-api-client)
- At this step, you will see a log
How to verify the changes of rest-api-client
For browser(bundle): same as above
For Node CJS: run command node index.js
For Node ESM: run command node index.mjs
For UMD: Upload the built UMD file and test on the console of browser KintoneRestAPIClient.version