diff --git a/samples/source_map/issue_1804/imported.js b/samples/source_map/issue_1804/imported.js new file mode 100644 index 00000000000..fdf6c19e354 --- /dev/null +++ b/samples/source_map/issue_1804/imported.js @@ -0,0 +1,11 @@ +export function f1() { + throw "line 2"; +} + +export function f2() { + throw "line 6"; +} + +export function f3() { + throw "line 10"; +} diff --git a/samples/source_map/issue_1804/main.js b/samples/source_map/issue_1804/main.js new file mode 100644 index 00000000000..a9d2b423121 --- /dev/null +++ b/samples/source_map/issue_1804/main.js @@ -0,0 +1,5 @@ +import { f2 } from "./imported.js" + +export default function() { + f2(); +} diff --git a/samples/source_map/typescript_template/test1.js b/samples/source_map/typescript_template/test1.js new file mode 100644 index 00000000000..4ce0dad9b3e --- /dev/null +++ b/samples/source_map/typescript_template/test1.js @@ -0,0 +1,2 @@ +var o={d:(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o:(o,e)=>Object.prototype.hasOwnProperty.call(o,e)},e={};o.d(e,{Z:()=>r});const r=()=>{!function(o){throw"cool is cool"}()};var t=e.Z;export{t as default}; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svcnVudGltZS9kZWZpbmUgcHJvcGVydHkgZ2V0dGVycyIsIndlYnBhY2s6Ly8vd2VicGFjay9ydW50aW1lL2hhc093blByb3BlcnR5IHNob3J0aGFuZCIsIndlYnBhY2s6Ly8vLi90ZXN0MS50cyJdLCJuYW1lcyI6WyJfX3dlYnBhY2tfcmVxdWlyZV9fIiwiZXhwb3J0cyIsImRlZmluaXRpb24iLCJrZXkiLCJvIiwiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJlbnVtZXJhYmxlIiwiZ2V0Iiwib2JqIiwicHJvcCIsInByb3RvdHlwZSIsImhhc093blByb3Bl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JqLCBwcm9wKSkiLCJmdW5jdGlvbiBjb29sVGhyb3coczogc3RyaW5nKSB7XG4gICAgdGhyb3cgXCJjb29sIFwiKyBzXG59XG5leHBvcnQgZGVmYXVsdCAoKSA9PiB7XG4gICAgY29vbFRocm93KFwiaXMgY29vbFwiKVxufTtcbiJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/samples/source_map/typescript_template/test1.ts b/samples/source_map/typescript_template/test1.ts new file mode 100644 index 00000000000..33bf0bbba20 --- /dev/null +++ b/samples/source_map/typescript_template/test1.ts @@ -0,0 +1,6 @@ +function coolThrow(s: string) { + throw "cool "+ s +} +export default () => { + coolThrow("is cool") +};