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
import * as path from "https://deno.land/[email protected]/path/mod.ts";
const { a, ...rest } = { a: 3, b: "bar" };
console.log(a, rest);
CLI:
deno bundle main.js build/main.js
deno run build/main.js
results in:
error: Uncaught ReferenceError: __rest is not defined
_a = { a: 3, b: "bar" }, a = _a.a, rest = __rest(_a, ["a"]);
^
at execute (file:///tmp/TestProj/build/main.js:389:40)
at gExp (file:///tmp/TestProj/build/main.js:90:7)
at __instantiate (file:///tmp/TestProj/build/main.js:97:27)
at file:///tmp/TestProj/build/main.js:395:1
build/main.js emits:
System.register("file:///tmp/TestProj/main", [], function (exports_11, context_11) {
// ...
return {
// ...
execute: function () {
_a = { a: 3, b: "bar" }, a = _a.a, rest = __rest(_a, ["a"]); // this is the error cause
// ...
}
};
});
The __rest method is not defined anywhere in the emitted build output.
If I comment out the import statement on first line, it works again. deno bundle seems to change its build output conditionally dependent on whether the file is a script or a module - doesn't matter what exactly is imported.
Is this a deno bundle error or could it be more related to underlying TS SystemJS bundling?
The text was updated successfully, but these errors were encountered:
kitsonk
added
swc
related to swc (bundling/transpiling)
and removed
cli
related to cli/ dir
upstream
Changes in upstream are required to solve these issues
labels
Nov 17, 2020
Reproduction
main.js:
CLI:
results in:
build/main.js emits:
The
__rest
method is not defined anywhere in the emitted build output.If I comment out the
import
statement on first line, it works again.deno bundle
seems to change its build output conditionally dependent on whether the file is a script or a module - doesn't matter what exactly is imported.Is this a
deno bundle
error or could it be more related to underlying TS SystemJS bundling?The text was updated successfully, but these errors were encountered: