What Changed
In v23.1, we moved the contents of the dist/js
folder from the devextreme
NPM package to a separate devextreme-dist package.
Reasons for Change
We wanted to make the devextreme
package smaller to reduce the time it takes to download it from NPM. Separating the dist
folder also keeps the devextreme
package within the allowed size of popular sandboxes.
Impact on Existing Apps
This change affects your web application if you use our ready-made bundles from the dist/js
folder.
How to Update Existing Apps
If the application uses scripts from the dist
folder
The application can use scripts from the dist
folder, for example:
HTML<script src="./node_modules/devextreme/dist/js/dx.all.js"></script>
JavaScriptimport * as mapsData from 'devextreme/dist/js/vectormap-data/world.js';
JSON[{
"outputFileName": "wwwroot/js/site.min.js",
"inputFiles": [
...
"node_modules/devextreme/dist/js/dx.all.js",
}]
In this case, you need to do the following:
- Install the
devextreme-dist
package in the cmd or add"devextreme-dist": "23.1.2"
to thepackage.json
file. - Replace links.
HTML<script src="./node_modules/devextreme-dist/js/dx.all.js"></script>
JavaScriptimport * as mapsData from 'devextreme-dist/js/vectormap-data/world.js';
JSON[{
"outputFileName": "wwwroot/js/site.min.js",
"inputFiles": [
...
"node_modules/devextreme-dist/js/dx.all.js",
}]
If you use ready-made bundles from the dist/js
folder
If you do not use your own bundling in the application and only use ready-made bundles from the dist/js
folder, then you need to have devextreme-dist
in your dependencies. You can delete the devextreme
package or replace "devextreme": "23.1.2"
with "devextreme-dist": "23.1.2"
in the package.json
file.
If you use CDN scripts
Replace devextreme
in the CDN link with devextreme-dist
.
HTML<script src="https://cdnjs.cloudflare.com/ajax/libs/devextreme-dist/23.1.3/js/dx.all.js"></script>