Closed mikecousins closed 4 years ago
@mikecousins You may fork the library, remove unneeded files from https://github.com/surveyjs/surveyjs/blob/master/src/entries/react.ts https://github.com/surveyjs/surveyjs/blob/master/src/entries/chunks/model.ts https://github.com/surveyjs/surveyjs/blob/master/src/entries/chunks/localization.ts
You may do not need matrixes questions or some others. The most questions are done as plug-ins you may remove them and build the library.
Moving from webpack into another solution may reduce the size as well.
Thank you, Andrew
+1 for this feature, stands at 650KB for survey-angular
I see that my minified version has many parts of the library which i don't use e.g. the signature pad. Any update on the question about treeshaking ?
@dactechie At this moment library is built into a single package. If you want, you can create your custom build via removing unused elements from the https://github.com/surveyjs/survey-library/blob/master/src/entries/chunks/model.ts file and other entry point files.
+1. Vue version is about 900k!!
I would be very interested in tree-shaking capability. The survey-vue package makes up almost half of our vendor bundle. We don't need language packs, etc. So tree-shaking them out would help us quite bit. Removing unused components would be great as well.
Closed since the workaround suggested: https://github.com/surveyjs/survey-library/issues/1362#issuecomment-425204688
Are you requesting a feature, reporting a bug or asking a question?
Feature
What is the current behavior?
We have to bring in the entire library and it's enormous.
What is the expected behavior?
We should be able to bring in the parts we need so that we don't kill our performance.
The Javascript library for React comes in at 98.3KB when gzipped. This is pretty unacceptable and is the single biggest library that we use. Is there any chance that we can get this written so that we can bring in chunks of the library instead to bring this down if we aren't using all of the features?