Add compatibility to the app for SDK in version 3 and 4

151
0
11-20-2023 06:22 AM
ŁukaszWiszniewski
New Contributor II

Hi everyone,

We have developed a React app for a few years and we still use SDK version 3.43. Because of the need to integrate with Experience Builder which uses ver. 4.xx, we would like to add support for ver.4.xx not only 3.43.

Currently, we use CDN links in index.html 

<script src="https://js.arcgis.com/3.43"></script>
I wonder how can we add support for both versions. I am considering using a webpack to somehow target an SDK version for the build script in package.json - sth. like:
 
"scripts": {
    "build4": "webpack --config webpack.prod.config.js",
    "build343": "webpack --config webpack.prod.config.js",
Do you have any experience with how to approach this challenge? Maybe Webpack is in the wrong direction and I should do it differently. The most important is to have the possibility to create two production versions of the app compatible with 3.43 and 4.xx
Tags (2)
0 Kudos
0 Replies