guillotinaweb / ngx-schema-form

HTML form generation based on JSON Schema
MIT License
485 stars 174 forks source link

ESM imports not working #477

Closed davidstrahm closed 1 year ago

davidstrahm commented 1 year ago

Hi, when importing like this:

import { DefaultWidgetRegistry } from 'ngx-schema-form';

it imports from node_modules/ngx-schema-form/lib, which is probably a commonJs import since it is not treeshaken upon prod build, it also pulls in z-schema and validator package, which bloats the main.js bundle, even if ngx-schema-form is only used in a lazy loaded module.

However, i see a esm2022 folder in node_modules/ngx-schema-form but i cannot import from there.

Do you have clarification on how to import the esm way?

davidstrahm commented 1 year ago

Nevermind it was an import error on my side