Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement tree-shaking #503

Open
alansemenov opened this issue Jan 11, 2023 · 0 comments · May be fixed by #504
Open

Implement tree-shaking #503

alansemenov opened this issue Jan 11, 2023 · 0 comments · May be fixed by #504

Comments

@alansemenov
Copy link
Member

Configure tree shaking of TS files in the build so that only imported properties get transpiled rather than entire packages.

Example of importing date-fns:
https://github.com/statisticsnorway/mimir/blob/master/src/main/resources/lib/ssb/utils/dateUtils.ts#L1

This currently transpiles the entire date-fns package instead of only enGB, nb, nn.

Another issue is that internal imports don't seem to be replaced by require.
This local import (./dateUtils) is currently inlined on transpilation in all its entirety:
https://github.com/statisticsnorway/mimir/blob/master/src/main/resources/lib/ssb/utils/articleUtils.ts#L9

ComLock added a commit that referenced this issue Jan 12, 2023
@ComLock ComLock linked a pull request Jan 12, 2023 that will close this issue
@ComLock ComLock removed their assignment Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants