You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/building/rollup-plugin-import-meta-assets.md
+46Lines changed: 46 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,6 +121,52 @@ export default {
121
121
};
122
122
```
123
123
124
+
### `preserveDynamicStructure`
125
+
126
+
Type: `Boolean`<br>
127
+
Default: `false`
128
+
129
+
When enabled, dynamic asset URLs (using template literals) are emitted to the Rollup pipeline and the URL pattern is rewritten to resolve relative to the first emitted asset.
130
+
131
+
**Requirements:** The output must preserve both filenames (no hashing) and the directory structure from the dynamic expression onwards.
132
+
If filenames are hashed or the directory structure changes, the runtime URL resolution will fail.
133
+
134
+
This is useful when your application or CDN already has versioned URLs, so you don't need filename hashing.
135
+
It also avoids generating a large switch statement in the output when you have many dynamic assets (e.g. an icon library).
0 commit comments