Skip to content

feat: transform plugin#1914

Merged
IWANABETHATGUY merged 14 commits intomainfrom
chore/transform-pluing
Aug 9, 2024
Merged

feat: transform plugin#1914
IWANABETHATGUY merged 14 commits intomainfrom
chore/transform-pluing

Conversation

@IWANABETHATGUY
Copy link
Copy Markdown
Member

@IWANABETHATGUY IWANABETHATGUY commented Aug 9, 2024

Description

  1. port vite transform plugin
  2. Only added basic test case, the rest testcases about exclude and include will be added after a new option to disable default transform behavior.

@netlify
Copy link
Copy Markdown

netlify Bot commented Aug 9, 2024

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit 6940652
🔍 Latest deploy log https://app.netlify.com/sites/rolldown-rs/deploys/66b5f92939bbbf0008157993

Comment thread Cargo.toml
mimalloc = "0.1.42"
mime = "0.3.17"
napi = { version = "3.0.0-alpha", features = ["async", "deferred_trace"] }
napi = { version = "3.0.0-alpha", features = ["async", "deferred_trace", "anyhow"] }
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allow napi::Error::from(anyhow::Error)

Comment thread packages/rolldown/src/plugin/builtin-plugin.ts Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Aug 9, 2024

Benchmarks Rust

group                                                               pr                                     target
-----                                                               --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol                     1.00     50.7±0.89ms        ? ?/sec    1.00     50.9±1.41ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-minify              1.00     77.3±0.95ms        ? ?/sec    1.00     77.1±1.93ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-minify-sourcemap    1.00     93.6±1.44ms        ? ?/sec    1.00     93.6±1.22ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap           1.00     59.1±0.67ms        ? ?/sec    1.01     59.7±2.17ms        ? ?/sec
bundle/bundle@rome-ts                                               1.00     99.3±0.93ms        ? ?/sec    1.00     98.8±0.80ms        ? ?/sec
bundle/bundle@rome-ts-minify                                        1.00    180.5±3.41ms        ? ?/sec    1.00    181.3±2.93ms        ? ?/sec
bundle/bundle@rome-ts-minify-sourcemap                              1.00    219.0±1.92ms        ? ?/sec    1.01    220.2±1.93ms        ? ?/sec
bundle/bundle@rome-ts-sourcemap                                     1.00    114.8±0.98ms        ? ?/sec    1.01    115.7±1.25ms        ? ?/sec
bundle/bundle@threejs                                               1.01     32.1±1.99ms        ? ?/sec    1.00     31.6±0.94ms        ? ?/sec
bundle/bundle@threejs-minify                                        1.00     77.6±1.39ms        ? ?/sec    1.02     79.0±0.88ms        ? ?/sec
bundle/bundle@threejs-minify-sourcemap                              1.00     92.6±1.26ms        ? ?/sec    1.03     95.8±1.65ms        ? ?/sec
bundle/bundle@threejs-sourcemap                                     1.01     41.1±0.35ms        ? ?/sec    1.00     40.6±0.26ms        ? ?/sec
bundle/bundle@threejs10x                                            1.00    345.1±3.54ms        ? ?/sec    1.01    350.1±5.62ms        ? ?/sec
bundle/bundle@threejs10x-minify                                     1.01    952.3±8.89ms        ? ?/sec    1.00   946.9±11.99ms        ? ?/sec
bundle/bundle@threejs10x-minify-sourcemap                           1.01  1193.1±15.30ms        ? ?/sec    1.00  1182.6±13.10ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                                  1.00    411.6±2.04ms        ? ?/sec    1.01    417.6±2.17ms        ? ?/sec
remapping/remapping                                                 1.00     33.0±0.24ms        ? ?/sec    1.00     33.0±0.75ms        ? ?/sec
remapping/render-chunk-remapping                                    1.00     83.5±0.65ms        ? ?/sec    1.05     87.3±0.74ms        ? ?/sec
scan/scan@rome-ts                                                   1.00     79.2±0.88ms        ? ?/sec    1.00     79.6±0.59ms        ? ?/sec
scan/scan@threejs                                                   1.00     24.1±0.20ms        ? ?/sec    1.00     24.2±0.16ms        ? ?/sec
scan/scan@threejs10x                                                1.01    246.7±2.99ms        ? ?/sec    1.00    244.9±1.26ms        ? ?/sec

@IWANABETHATGUY IWANABETHATGUY force-pushed the chore/transform-pluing branch from 482f373 to 6882042 Compare August 9, 2024 09:15
@IWANABETHATGUY IWANABETHATGUY force-pushed the chore/transform-pluing branch from aa42864 to 6940652 Compare August 9, 2024 11:10
@IWANABETHATGUY IWANABETHATGUY changed the title feat: ecma transform plugin feat: transform plugin Aug 9, 2024
@IWANABETHATGUY IWANABETHATGUY marked this pull request as ready for review August 9, 2024 11:29
@IWANABETHATGUY IWANABETHATGUY requested a review from hyf0 August 9, 2024 11:38
@IWANABETHATGUY IWANABETHATGUY added this pull request to the merge queue Aug 9, 2024
Merged via the queue into main with commit d37079a Aug 9, 2024
@IWANABETHATGUY IWANABETHATGUY deleted the chore/transform-pluing branch August 9, 2024 11:47
github-merge-queue Bot pushed a commit that referenced this pull request Aug 13, 2024
<!-- Thank you for contributing! -->

### Description

Related to #1914 and #1915 

https://github.com/rolldown/rolldown/blob/6389d62f876a122df451d3e0151f79f59dd978cb/crates/rolldown_plugin_transform/src/lib.rs#L20-L25
<!-- Please insert your description here and provide especially info
about the "what" this PR is solving -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants