Skip to content

Comments

feat(rolldown_plugin_utls): finish render_asset_url_in_js#5508

Merged
shulaoda merged 1 commit intomainfrom
07-30-feat_rolldown_plugin_utls_finish_render_asset_url_in_js
Jul 30, 2025
Merged

feat(rolldown_plugin_utls): finish render_asset_url_in_js#5508
shulaoda merged 1 commit intomainfrom
07-30-feat_rolldown_plugin_utls_finish_render_asset_url_in_js

Conversation

@shulaoda
Copy link
Member

No description provided.

@shulaoda shulaoda force-pushed the 07-30-feat_rolldown_plugin_utls_finish_render_asset_url_in_js branch from 8126197 to 45ae166 Compare July 30, 2025 00:20
@shulaoda shulaoda changed the title feat(rolldown_plugin_utls): finish render_asset_url_in_js feat(rolldown_plugin_utls): finish render_asset_url_in_js Jul 30, 2025
@shulaoda shulaoda marked this pull request as ready for review July 30, 2025 00:21
@github-actions
Copy link
Contributor

github-actions bot commented Jul 30, 2025

Benchmarks Rust

  • target: main(76d8a41)
  • pr: 07-30-feat_rolldown_plugin_utls_finish_render_asset_url_in_js(8e5b390)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.00     78.0±2.84ms        ? ?/sec    1.04     81.4±2.96ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.00     87.1±1.85ms        ? ?/sec    1.05     91.5±3.11ms        ? ?/sec
bundle/bundle@rome_ts                                        1.00    118.1±3.40ms        ? ?/sec    1.01    119.1±1.89ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.00    137.4±1.94ms        ? ?/sec    1.03    141.3±3.29ms        ? ?/sec
bundle/bundle@threejs                                        1.04     44.1±2.73ms        ? ?/sec    1.00     42.6±1.35ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.00     52.9±0.64ms        ? ?/sec    1.01     53.6±1.89ms        ? ?/sec
bundle/bundle@threejs10x                                     1.00    441.7±4.82ms        ? ?/sec    1.03    454.0±9.96ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.00    525.9±3.15ms        ? ?/sec    1.02    534.0±6.04ms        ? ?/sec
scan/scan@rome_ts                                            1.00     90.1±1.69ms        ? ?/sec    1.01     90.7±1.90ms        ? ?/sec
scan/scan@threejs                                            1.00     30.7±0.56ms        ? ?/sec    1.01     31.0±0.82ms        ? ?/sec
scan/scan@threejs10x                                         1.02    329.4±6.74ms        ? ?/sec    1.00    322.8±3.98ms        ? ?/sec

@graphite-app graphite-app bot changed the base branch from 07-30-feat_rolldown_plugin_utils_align_replacement_logic_for___vite_asset__ to graphite-base/5508 July 30, 2025 04:56
@shulaoda shulaoda force-pushed the 07-30-feat_rolldown_plugin_utls_finish_render_asset_url_in_js branch from 45ae166 to e07f199 Compare July 30, 2025 05:14
@shulaoda shulaoda force-pushed the graphite-base/5508 branch from c590e03 to 97d7ad5 Compare July 30, 2025 05:14
@graphite-app graphite-app bot changed the base branch from graphite-base/5508 to main July 30, 2025 05:15
@graphite-app
Copy link
Contributor

graphite-app bot commented Jul 30, 2025

Merge activity

  • Jul 30, 5:15 AM UTC: Graphite rebased this pull request, because this pull request is set to merge when ready.

@shulaoda shulaoda force-pushed the 07-30-feat_rolldown_plugin_utls_finish_render_asset_url_in_js branch from e07f199 to 8e5b390 Compare July 30, 2025 08:16
@netlify
Copy link

netlify bot commented Jul 30, 2025

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit 8e5b390
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/6889d4db877956000839b527

@shulaoda shulaoda added this pull request to the merge queue Jul 30, 2025
Merged via the queue into main with commit f9d896b Jul 30, 2025
22 checks passed
@shulaoda shulaoda deleted the 07-30-feat_rolldown_plugin_utls_finish_render_asset_url_in_js branch July 30, 2025 08:35
This was referenced Aug 4, 2025
shulaoda added a commit that referenced this pull request Aug 4, 2025
## [1.0.0-beta.31] - 2025-08-04

### 🚀 Features

- support function for asset_inline_limit (#5453) by @AliceLanniste
- hmr: generate initializer for `export * from ...` (#5577) by @hyf0
- hmr: remove meaningless stmt instead of replacing with empty stmt (#5570) by @hyf0
- option `watch.clearScreen` (#5518) by @situ2001
- rolldown: oxc v0.80.0 (#5538) by @Boshen
- plugin/generateBundle: add support for modifying chunk filename (#5564) by @shulaoda
- assetFileNames: support `name` and `originalFileName` (#5555) by @shulaoda
- add optional `onInvalidate` schema to validator (#5528) by @situ2001
- don't throw resolve errors for dynamic import inside try block (#5537) by @shulaoda
- rolldown: oxc v0.79.0 (#5512) by @Boshen
- rolldown_plugin_asset: align `render_chunk` logic (#5511) by @shulaoda
- rolldown_plugin_utls: finish `render_asset_url_in_js` (#5508) by @shulaoda
- rolldown_plugin_utils: align replacement logic for `__VITE_ASSET__` (#5507) by @shulaoda
- rolldown_plugin_utils: add partial `render_asset_url_in_js` support (#5504) by @shulaoda
- expose `sourcemapBaseUrl` from NormalizedOutputOptions (#5513) by @sapphi-red

### 🐛 Bug Fixes

- modify output filename correctly in `generateBundle` and `writeBundle` (#5580) by @shulaoda
- hmr: ensure correct runtime behavior for `export * from ...` (#5578) by @hyf0
- hmr: repeated imports should point to the same binding (#5571) by @hyf0
- hmr: handle `export * from ...` (#5566) by @hyf0
- rolldown_plugin_web_worker_post: handle `import.meta` correctly (#5565) by @shulaoda
- antd bundle output not correct (#5549) by @IWANABETHATGUY
- hmr: module namespace object should be included via treeshaking mechanism normally (#5543) by @hyf0
- plugin/vite-resolve: use `import` / `require` conditions for external modules resolution (#5540) by @sapphi-red
- rolldown_plugin_asset: InvalidAsset#is should match InvalidAsset::True (#5529) by @AliceLanniste
- __name lacks require('./chunk-containing-runtime') when format: 'cjs' + keepNames: true (#5526) by @IWANABETHATGUY
- plugin/vite-resolve: resolve externalized packages with `resolve.externalConditions` (#5491) by @sapphi-red
- optimization.inlineConst: true does not keep export names when output.minifyInternalExports: true is enabled (#5520) by @IWANABETHATGUY
- scanner: identify `module.exports.__esModule = true` (#5503) by @overlookmotel
- error instead of panic if `sourcemapBaseUrl` is an invalid URL (#5514) by @sapphi-red

### 🚜 Refactor

- hmr: use `__rolldown_exports__` as the name for esm module namespace object (#5579) by @hyf0
- tests: rename `_configName` to `_testName` in configuration files and update variant formatting in snapshots (#5569) by @hyf0
- rolldown: remove unnecessary comments (#5552) by @situ2001
- rolldown: Remove `rolldown_rstr` crate and use `CompactStr` directly (#5542) by @Copilot
- hide namespace statement index knowledge inside StmtInfos (#5545) by @sapphi-red
- use pascal case when naming bitflags field for `ImportRecordMeta` (#5539) by @IWANABETHATGUY
- use concat_string! to simplify string concatenation (#5527) by @IWANABETHATGUY
- use combinator function handle `sourcemap_base_url` parsing (#5517) by @IWANABETHATGUY
- rolldown_plugin_utils: improve `to_output_file_path_in_js` (#5505) by @shulaoda

### 📚 Documentation

- wording nit (#5521) by @nullxone

### 🧪 Testing

- rust: rename `configName` to `_configName` and add comments (#5568) by @hyf0
- rust: re-organize `rolldown_testing_config` (#5567) by @hyf0

### ⚙️ Miscellaneous Tasks

- deps: lock file maintenance npm packages (#5582) by @renovate[bot]
- deps: lock file maintenance (#5581) by @renovate[bot]
- deps: lock file maintenance rust crates (#5576) by @renovate[bot]
- deps: lock file maintenance npm packages (#5574) by @renovate[bot]
- deps: update github-actions (#5573) by @renovate[bot]
- deps: update dependency rolldown-plugin-dts to v0.15.1 (#5572) by @renovate[bot]
- deps: update dependency tsdown to v0.13.2 (#5562) by @renovate[bot]
- deps: update dependency rolldown-plugin-dts to ^0.15.0 (#5563) by @renovate[bot]
- ai: Add AGENTS.md and GitHub Copilot setup workflow (#5556) by @Copilot
- deps: update dependency tsdown to v0.13.1 (#5551) by @renovate[bot]
- deps: update dependency rolldown-plugin-dts to v0.14.3 (#5544) by @renovate[bot]
- ensure all diagnostics in self.errors have Severity::Error (#5494) by @sapphi-red
- vscode: remove `code-spell-checker` extension (#5530) by @shulaoda
- deps: update dependency rolldown-plugin-dts to v0.14.2 (#5522) by @renovate[bot]
- add link to the REPL in the reproduction field description (#5519) by @sapphi-red
- enable some rollup tests (#5515) by @sapphi-red

### ❤️ New Contributors

* @Copilot made their first contribution in [#5556](#5556)
* @nullxone made their first contribution in [#5521](#5521)

Co-authored-by: shulaoda <[email protected]>
#[allow(clippy::too_many_lines)]
pub async fn render_asset_url_in_js(&self) -> anyhow::Result<Option<String>> {
// __VITE_ASSET__ -> 14 && __VITE_ASSET_PUBLIC__ -> 21
// __VITE_ASSET__([\w$]+)__(?:\$_(.*?)__ -> 14 && __VITE_ASSET_PUBLIC__([a-z\d]{8})__ -> 21
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, it may be intentional because I found declaration of prefix here.

let built_url = rolldown_utils::concat_string!("__VITE_ASSET_PUBLIC__", hash, "__");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants