Comments (11)
@shadowtime2000 A few reasons:
Deno.emit
will bundle all resources together into one file. If there are multiple entry files that share dependencies, there will be duplicate code. I think a better way in browsers is to allow for code splitting explained here, which is not currently possible withDeno.emit
.- Since this bundler supports different file types such as images, css and html etc., the correct output paths need to be injected, which is done by a typescript transformer.
Deno.emit
does not allow transformer hooks as of now. Deno.emit
does not use system modules anymore, though browsers do not yet support top level await.
But I am playing with the idea of using Deno.bundle
if none of the upper arguments apply.
from bundler.
No that was a good question. I asked on deno discord about a transfomer option for Deno.emit
, seems to have gone lost. I would like to use either Deno.emit
rather than the ts module, so if that became a thing I'd gladly switch.
from bundler.
wish deno openPlugin
become stable ASAP
from bundler.
possible solution once feature-rich and stable: https://github.com/nestdotland/deno_swc/actions
from bundler.
Any progress on this?
from bundler.
Not yet sadly. Seems like the deno_swc rep hasn't been updated for months and before a switch, I would need some help to determine if all features are available. For example: How would transforming ts code to system (like in module:system
in ts compilerOptions) work with swc? I never used swc myself and would need some help on this.
from bundler.
Any reason for not using Deno.emit
with not setting bundle
to just transpile the code @timreichen?
from bundler.
@timreichen Makes sense, but you can disable bundling with Deno.emit
so that it only transpiles TS.
from bundler.
Yes but I need the ts compiler to be able to do more than just transpile ts to js. There is a lot of ast manipulation going on for injecting paths and import statements etc.
What would the advantage of using Deno.emit
be? I still would need to use a ast walker parallel to that.
from bundler.
@timreichen Fair point. I wasn't arguing with you, just pointing out that your first point about bundling didn't work 😄
from bundler.
possible solution once feature-rich and stable: https://github.com/nestdotland/deno_swc/actions
After tests it seems that wasm based deno-swc is slower than the ts module. Closing this issue for now until more options are available. Feel free to reopen again.
from bundler.
Related Issues (20)
- how to disable export default in final js bundle file? HOT 2
- Use as a api HOT 2
- API: bundle function don't write output assets HOT 2
- API doc
- hello_world examples not working HOT 1
- Generic lambda compiled as React components HOT 1
- export default is working only with function HOT 1
- bundler and bundler api are not emiting javascript output HOT 3
- examples/server don't work HOT 2
- spa dev server example HOT 1
- project struture in read me HOT 1
- API Examples failing
- Feature Request: Support circular dependencies HOT 3
- Bundler fails to run when trying to import `acorn` via `terser` HOT 5
- Crash with CSS Gradients: `TypeError: i.walkFunctionNodes is not a function` HOT 3
- Does not understand .mjs extension / script type HOT 1
- Fails to download one of the dependency files HOT 3
- Bundler misinterprets Windows path as a url HOT 4
- Newline behavior HOT 4
- Guide for create pluging HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bundler.