Replaced vite with tsc for build#368
Replaced vite with tsc for build#368ijlee2 wants to merge 7 commits intoember-tooling:mainfrom ijlee2:remove-vite-for-build
Conversation
| "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.
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.
NullVoxPopuli
left a comment
There was a problem hiding this comment.
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