Coder Social home page Coder Social logo

bundle-examples's Introduction

bundle examples

Example 1

Expected

❯ deno run example1.ts
Module { a: "a", Symbol(Symbol.toStringTag): "Module" }

Actual

❯ deno run example1.bundle.js
a

At least it should be { a: "a" }, instead we just get "a".

Example 2

This just overflows the stack.

Example 3

Expected

> deno run example3.ts
Check file:///Users/kitsonk/github/bundle-examples/example3.ts
{ a: "a" }

Actual

❯ deno run example3.bundle.js
error: Uncaught ReferenceError: a is not defined
    a
    ^
    at file:///Users/kitsonk/github/bundle-examples/example3.bundle.js:2:5

Example 4

Expected

❯ deno run --allow-read example4.ts
Check file:///Users/kitsonk/github/bundle-examples/a.ts
Module { a: "a", Symbol(Symbol.toStringTag): "Module" }

Actual

❯ deno bundle example4.ts example4.bundle.js
Bundle file:///Users/kitsonk/github/bundle-examples/example4.ts
error: failed to bundle

Example 5

Expected

❯ deno run example5.ts
Check file:///Users/kitsonk/github/bundle-examples/example5.ts
a

Actual

❯ deno run example5.bundle.js
error: Uncaught ReferenceError: a is not defined
console.log(a);
            ^
    at file:///Users/kitsonk/github/bundle-examples/example5.bundle.js:1:13

Example 6

Expected

❯ deno run example6.ts                      
Check file:///Users/kitsonk/github/bundle-examples/example6.ts
error: Uncaught AssertionError: ooops
    throw new AssertionError(msg);
          ^
    at assert (asserts.ts:152:11)
    at example6.ts:3:1

Actual

❯ deno run example6.bundle.js               
error: Uncaught ReferenceError: AssertionError is not defined
        throw new AssertionError(msg);
        ^
    at assert (file:///Users/kitsonk/github/bundle-examples/example6.bundle.js:97:9)
    at file:///Users/kitsonk/github/bundle-examples/example6.bundle.js:100:1

Example 7

false file:///Users/kitsonk/github/bundle-examples/f.ts
true file:///Users/kitsonk/github/bundle-examples/example7.ts

bundle-examples's People

Contributors

kitsonk avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.