-
Notifications
You must be signed in to change notification settings - Fork 17
Replaced vite with tsc for build #368
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
base: main
Are you sure you want to change the base?
Conversation
67831e4 to
f1902ae
Compare
| "test:example": "pnpm preexample && cd examples && pnpm test", | ||
| "test:run": "vitest run", | ||
| "test:ui": "vitest --ui" | ||
| "test:vitest": "vitest run --exclude dist-for-testing --exclude tests" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed the folder tests (previously used to store files for vitest), because @codemod-utils/tests expects fixtures and test files for its testing to be in the tests folder.
f1902ae to
384959e
Compare
384959e to
e99b58e
Compare
NullVoxPopuli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we want to use tsc for compilation.
It's likely that we bundle dependencies and modules, because having fewer modules is significantly more performant.
We recently put template-lint in bundles, to see significant speed increases to the overall runtime for large projects, and time to response in editors.
Now, sure, the package is large, but i'd like to see the 'package.json#files' array utilized better.
I agree that npmignore is not a good tool.
I believe this pr's purpose should just result in adding/changing the files array, and deleting npmignore
Background
Closes #360.
The published plugin is unusually large due to
vite. Inv2.0.5(before.npmignorehad been added), it had weighed at 3.73 MB. Inv2.0.6, at 2.93 MB.Using
viteis also unnecessary for simple Node projects. We can usetscto compile the TypeScript files, then publish the resultingdistfolder. This results in fewer dependencies and a package size around 30.2 kB (0.8% of the size inv2.0.5, 1.01% of that inv2.0.6).Before: Unpacked size of 2.9 MB
After: Unpacked size of 30.2 kB