-
Notifications
You must be signed in to change notification settings - Fork 189
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
Add sourcemap feature #372
Add sourcemap feature #372
Conversation
Seeing around 15% savings in compile times on my machine when running This PR gets BeforeAround AfterAround |
1aa56ac
to
dab1a3b
Compare
@@ -233,7 +235,12 @@ where | |||
let project_root = options.project_root.clone(); | |||
let mut printer = Printer::new(&mut dest, options); | |||
|
|||
printer.sources = Some(&self.sources); | |||
#[cfg(feature = "sourcemap")] | |||
{ |
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.
Conditionally compiling expressions isn't stable, so needed to wrap this in a block.
Cargo.toml
Outdated
@@ -29,12 +29,13 @@ crate-type = ["rlib"] | |||
[features] | |||
default = ["bundler", "grid", "nodejs"] |
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 think we should probably add "sourcemap" to the default features. I guess the node bindings are getting it through "bundler" right now, though they kinda use it directly too even without the bundler.
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.
Ok great. Just force pushed a commit with sourcemap as an explicitly default feature
This commit introduces the "sourcemap" feature. Users that do not need sourcemaps can disable this feature and save roughly 15% on compile times. Related to parcel-bundler#357
dab1a3b
to
5313652
Compare
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.
Thanks!
This commit introduces the "sourcemap" feature.
Users that do not need sourcemaps can disable this feature and save
roughly 15% on compile times.
Related to #357