-
Notifications
You must be signed in to change notification settings - Fork 0
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
Make starbeam smaller / faster #5
Conversation
Run & review this pull request in StackBlitz Codeflow. |
144cd51
to
5761fd2
Compare
1899223
to
2af9405
Compare
@@ -31,6 +31,9 @@ export default (mode = process.env["MODE"] ?? "development"): RollupPlugin => { | |||
return createReplacePlugin( | |||
(id) => /\.(j|t)sx?$/.test(id), | |||
{ | |||
// remove inline testing | |||
"import.meta.vitest": "false", |
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.
we don't want to include in-source tests in any output code
@@ -113,16 +113,27 @@ export default function typescript( | |||
}; | |||
|
|||
const minify = { | |||
format: { | |||
comments: mode === 'production', |
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.
turns out, SWC doesn't actually remove comments 😅
@@ -1,6 +1,7 @@ | |||
import { execSync } from 'node:child_process'; | |||
import { join, resolve } from "node:path"; | |||
|
|||
import terser from '@rollup/plugin-terser'; |
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.
used for removing comments
Paired with starbeamjs/starbeam#149