3 ms·
Deno is a joy to use server-side. Though as soon as it's used in conjunction with even something simple like minified code, you're forced back to node/npm.
by seumars 5y ago
Deno is a joy to use server-side. Though as soon as it's used in conjunction with even something simple like minified code, you're forced back to node/npm.
- nllsh 5y agoHow are you using Deno with minified code? Do you mean importing a minified script like https://cdn.jsdelivr.net/npm/react/cjs/react.production.min.js https://cdn.jsdelivr.net/npm/react/cjs/react.production.min.... ?
- seumars 5y agoI meant bundling your code for production.
- tonyedgecombe 5y agoWhy would you need to do that for code running on Deno? It doesn't need to be sent over the wire.
- seumars 5y agoObviously not for server code. Example: serve 'src/app.js' uncompressed during development, and 'assets/app.min.js' during production.
- mark_and_sweep 5y agoYou can use `deno bundle`: https://deno.land/manual@v1.20.1/tools/bundler.md https://deno.land/manual@v1.20.1/tools/bundler.md
- mark_and_sweep 5y agoIf you want to bundle and minify JavaScript code, you can use esbuild: import * as esbuild from "https://deno.land/x/esbuild@v0.14.25/mod.js"; If you want to bundle and minify SCSS, you can use dart-sass: import { useDartSass } from "https://raw.githubusercontent.com/MarkTiedemann/deno-dart-sass/0.1.0/mod.ts";