You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bundle in downstream application is responsible for transpiling. json-editor does not bundle all of core-js. Bundle size of downstream application decreases.
Actual behavior
All of core-js is bundled with json-editor, bundle is the main entry point. Downstream application is bloated with polyfills that are not needed.
General information
Expected behavior
Bundle in downstream application is responsible for transpiling.
json-editor
does not bundle all ofcore-js
. Bundle size of downstream application decreases.Actual behavior
All of
core-js
is bundled withjson-editor
, bundle is the main entry point. Downstream application is bloated with polyfills that are not needed.Steps to reproduce the behavior
npx webpack --config config/webpack.prod.js --profile --json > stats.json && npx webpack-bundle-analyzer stats.json dist
-> Parsed size is 515kBbabel-loader
fromwebpack.common.js
npx webpack --config config/webpack.prod.js --profile --json > stats.json && npx webpack-bundle-analyzer stats.json dist
-> Parsed size is 265kBWorkaround in downstream application
Import
JSONEditor
like this:import { JSONEditor } from "@json-editor/json-editor/src/core.js";
Solution
Change
json-editor/package.json
Line 6 in e3f8df6
More info about entry points: https://vitejs.dev/guide/build.html#library-mode
The text was updated successfully, but these errors were encountered: