chore: declare packages as side-effect free - #2631
Open
devtechedge wants to merge 1 commit into
Open
devtechedge wants to merge 1 commit into
devtechedge wants to merge 1 commit into
Conversation
✅ Deploy Preview for jsonforms-examples ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2627.
This declares
sideEffectsso webpack, Rollup and esbuild can drop unused modules.core,react,material-renderers,vanilla-renderers,angular,angular-materialandvueget"sideEffects": false.vue-vanillaandvue-vuetifyget"sideEffects": ["*.css"]instead.Their READMEs tell users to import
@jsonforms/vue-vanilla/vanilla.cssand@jsonforms/vue-vuetify/lib/jsonforms-vue-vuetify.css, and a plainfalselets webpack drop those imports.A throwaway webpack probe kept both stylesheets with
*.css, including the nested vuetify file, and dropped both when the field wasfalse.dayjs.extendruns at module scope inmaterial-renderers,vue-vuetifyandangular-material.Nothing imports those modules bare, and each package ships one bundle, so that setup stays when a renderer is actually used.
ng-packagr copies
sideEffects: falseinto the builtlib/package.jsonfor both Angular packages, so the published manifest and the build output match.pnpm i --frozen-lockfile,pnpm build,pnpm testandpnpm run build:examples-apppassed.npm packon core, angular, vue-vanilla and vue-vuetify includes the field.An esbuild probe dropped an unused
@jsonforms/coreimport (about 50KB down to the entry) and kept the module when the field was absent.