Hello, everyone.
I've developed a widget that uses Experience Builder Developer Edition 1.14.
import { dataSourceJsonCreator, type FeatureLayerDataSourceConstructorOptions } from 'jimu-core/data-source';
...
const dsJson = dataSourceJsonCreator.createDataSourceJsonByLayerDefinition(dsId, layerDefinition, normalizedUrl);
However, in Experience Builder Developer Edition 1.18, I see that this has changed to DataSourceUtils, which forced me to update my imports:
import { DataSourceManager, dataSourceUtils, ServiceManager, DataSourcesChangeMessage, DataSourcesChangeType, MessageManager } from 'jimu-core';
...
const dsJson = dataSourceUtils.dataSourceJsonCreator.createDataSourceJsonByLayerDefinition(dsId, layerDefinition, normalizedUrl);
Is there a way to package all the necessary files with a custom widget bundle, so it doesn’t try to import something that isn’t there on the client?
I mean, I know the import path will change in the future.
Is there a manifest option I’m unaware of, or a webpack option to make the build larger but self-contained—or is that just not possible?
How do you all handle these kinds of breaking changes?
Also, if I'm developing for Portal 1.5 and using Developer Edition 1.5, is that the safest approach?