Closed codeatrajan closed 1 year ago
Can you research if antd has a UMD build?
Yes, antd has UMD build https://ant.design/docs/react/contributing#build
See here: https://ant.design/docs/react/introduce#import-in-browser and the note there:
Note: You should import react、react-dom、dayjs before using antd.js.
I got this to work by adding the following to the index.html template in the <head>
tag:
<script src="https://unpkg.com/dayjs@1.11.9/dayjs.min.js"></script>
and using the antd config in webpack.config.js that you shared above.
See the basic changes needed here: https://github.com/enuchi/React-Google-Apps-Script/commit/0d074a087951871ac276659dc9e5e23d1a436c1b
Yes, Now I can able add it after adding dayjs.
Thanks for providing this great project and support.
Happy to help
Hi I have made a fresh clone of the repo and Installed the packages and Its working fine,
And i have tried to add a new package npm i antd
and updated the webpack.config.js for adding CDN
case 'antd': return { name: packageName, var: 'antd', version: packageVersion, url: https://unpkg.com/antd@${packageVersion}/dist/antd${packageSuffix}, }; But after deploying getting ReferenceError: antd is not defined this is the CDN Link https://unpkg.com/antd@5.7.3/dist/antd.min.js