-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Hello,
i have been using breeze-client package on the server with Sequelize using a custom DataManager class and it worked great.
I try to use it with latest ESM spec and I cannot import the adapters, i get the error
Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import 'node_modules\breeze-client\adapter-ajax-fetch' is not supported resolving ES modules imported from system-data\lib\breeze\cBreezeInit.js
Did you mean to import [email protected]/node_modules/breeze-client/bundles/breeze-client-adapter-ajax-fetch.umd.js?
I try to import it like this
import { AjaxFetchAdapter } from "breeze-client/adapter-ajax-fetch";
import { DataServiceWebApiAdapter } from "breeze-client/adapter-data-service-webapi";
import { ModelLibraryBackingStoreAdapter } from "breeze-client/adapter-model-library-backing-store";
Any ideas ? with CommonJS it worked great
I can still do the following but I am looking for a better solution
const require = Module.createRequire(import.meta.url);
require("breeze-client/adapter-ajax-fetch");
require("breeze-client/adapter-data-service-webapi");
require("breeze-client/adapter-model-library-backing-store");
Thanks in advance