-
-
Notifications
You must be signed in to change notification settings - Fork 327
Open
Description
Relevant Rollup documentation
Note that when emitting assets that correspond to an existing file, it is recommended to set the originalFileName property in the this.emitFile call instead as that will not only watch the file but also make the connection transparent to other plugins.
Link
Change required
Add:
const ref = this.emitFile({
type: 'asset',
name: assetName,
+ originalFileName: absoluteAssetPath,
source: transformedAssetContents,
}); to this call:
web/packages/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js
Lines 176 to 180 in b304034
| const ref = this.emitFile({ | |
| type: 'asset', | |
| name: assetName, | |
| source: transformedAssetContents, | |
| }); |
Use case
Trying to map the source of some emitted assets in a plugin's writeBundle and getting null.
Metadata
Metadata
Assignees
Labels
No labels