sourceMap creates multiple sourceMappingURL comments #1

Open
opened 2024-02-21 07:31:38 +01:00 by hyrious · 0 comments
hyrious commented 2024-02-21 07:31:38 +01:00 (Migrated from github.com)

Reproduction

$ mkdir test && cd test
$ echo '{}' > package.json
$ npm i -D @marijn/buildtool
$ mkdir src
$ cat <<EOF >src/index.ts
export const foo = 1
EOF
$ node -e "require('@marijn/buildtool').build('src/index.ts', { sourceMap: true })"
$ cat dist/index.js
const foo = 1;

export { foo };
//# sourceMappingURL=index.js.map

//# sourceMappingURL=index.js.map%
**Reproduction** ```console $ mkdir test && cd test $ echo '{}' > package.json $ npm i -D @marijn/buildtool $ mkdir src $ cat <<EOF >src/index.ts export const foo = 1 EOF $ node -e "require('@marijn/buildtool').build('src/index.ts', { sourceMap: true })" $ cat dist/index.js const foo = 1; export { foo }; //# sourceMappingURL=index.js.map //# sourceMappingURL=index.js.map% ```
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
marijn/buildtool#1
No description provided.