question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Serve precompiled JavaScript to the browser

See original GitHub issue

Reason

It would be nice to be able to directly import TypeScript modules from the browser without having to use deno bundle.

Suggestions

  • Every TypeScript should be compiled once to JavaScript.
  • If User-Agent is Deno/<VERSION> or Accept contains application/typescript, serve TypeScript code. If User-Agent is one of the browsers and Accept is */*, serve JavaScript code. If Accept contains text/html, serve HTML document. Otherwise, serve TypeScript code.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:20
  • Comments:34 (15 by maintainers)

github_iconTop GitHub Comments

11reactions
crowlKatscommented, Jun 28, 2022

we are currently doing various architectural changes to the registry and website, so any PRs will get invalid pretty quickly. I will bring this up internally once our reworks are completed

4reactions
Cianticcommented, Jun 28, 2022

@wojpawlik This creates the overhead of having to bundle things, but that is probably rather advantageous keeping in mind that the browser can load all JS with a single request, rather than one request per module.

Neat tool, I just think these external bundlers have problem, do they exist five years from now? If they get popular the bandwidth costs etc. start to stack up. It would be nice to have official way to get JS files from deno.land directly.

Bundling as one JS file should be optional, sometimes I want just couple of neat functions from functional libraries and not all.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Precompiled JavaScript | Better world by better software
Precompiled JavaScript. How to use ES6 and target older NodeJS platforms without mangling the code to the lowest common denominator.
Read more >
ruby on rails - How to avoid precompiled assets being served ...
Now when I precompile my assets for production using rake assets:precompile the three JavaScript files are concatenated into reviews.js . This ...
Read more >
JavaScript Start-up Optimization - web.dev
When a browser requests a resource, that resource needs to be fetched and then decompressed. This can be a problem, even in first-world ......
Read more >
The Asset Pipeline - Ruby on Rails Guides
Sprockets concatenates all JavaScript files into one master .js file and all ... The precompiled copies are then served as static assets by...
Read more >
Compiling Less | Less Web Development Essentials
It is important to note that the results from client-side compiling serve only for ... To support less.js for older browsers, you could...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found