We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ddc91c commit 23bc2bcCopy full SHA for 23bc2bc
src/index.ts
@@ -12,8 +12,10 @@ export default (transform?: (metadata: string) => string): Plugin => {
12
name: 'userscript-metadata',
13
async resolveId(source, importer, options) {
14
if (source.endsWith(suffix)) {
15
- const { id } = await this.resolve(source, importer, options);
16
- metadataMap.set(importer, id.slice(0, -suffix.length));
+ const sourceFile = source.slice(0, -suffix.length);
+ const { id } = await this.resolve(sourceFile, importer, options);
17
+ metadataMap.set(importer, id);
18
+ return source;
19
}
20
},
21
load(id) {
0 commit comments