2saturdayscode
2saturdayscode
DDeno
Created by EthereaL on 12/2/2024 in #help
Deno not found in nextjs15 client component
Never used NextJS but if you use process.env.NEXT_PUBLIC_VARIABLE_NAME it should work because probably Next bundler will replace them in the build step of the client components
5 replies
DDeno
Created by artpods56 on 11/17/2024 in #help
Cant configure Tailwind with DaisyUI using Deno inside of Docker | Error: Cannot find module daisyui
Iknow it sounds unusual but did you try to restart the deno server language?
13 replies
DDeno
Created by artpods56 on 11/17/2024 in #help
Cant configure Tailwind with DaisyUI using Deno inside of Docker | Error: Cannot find module daisyui
Instead of import "typed-htmx" try import type {} from "typed-htmx"
13 replies
DDeno
Created by cdaringe on 11/23/2024 in #help
How to import relative JSR module from import map
Yeah I see
9 replies
DDeno
Created by artpods56 on 11/17/2024 in #help
Cant configure Tailwind with DaisyUI using Deno inside of Docker | Error: Cannot find module daisyui
This is a legit and the official way to have compatibility with node stuff, it’s not magic it just downloads the stuff from npm and saves it there, you would get the same result if you opted in vendoring (ie save the deps in your repo so you can upload it in your deploys. It would create a node_modules dir but also a vendor dir too for non-npm des) so really nothing to worry about
13 replies
DDeno
Created by ssimonlp on 11/22/2024 in #help
Failed deployment Deno Deploy
no idea 😦
8 replies
DDeno
Created by cdaringe on 11/23/2024 in #help
How to import relative JSR module from import map
it's just the export
9 replies
DDeno
Created by cdaringe on 11/23/2024 in #help
How to import relative JSR module from import map
I don't think you are right, there's no jsr entry for that
9 replies
DDeno
Created by cdaringe on 11/23/2024 in #help
How to import relative JSR module from import map
Strangely enough this works:
"imports": {
"@std/path": "jsr:@std/path/posix"
}
"imports": {
"@std/path": "jsr:@std/path/posix"
}
Give it a try
9 replies
DDeno
Created by cdaringe on 11/23/2024 in #help
How to import relative JSR module from import map
it should work, let me try
9 replies
DDeno
Created by ssimonlp on 11/22/2024 in #help
Failed deployment Deno Deploy
I see you have your own scripts to build and develop, what bundler are you using? You can instruct it to define it to what it expects
8 replies
DDeno
Created by Kevin Tale on 11/22/2024 in #help
How to add a simple live reload?
That's a nice idea! Just inject a script tag nice, it also encapsulate the behavior
30 replies
DDeno
Created by Kevin Tale on 11/22/2024 in #help
How to add a simple live reload?
You are most welcome, I understand the excitement it’s so satisfying building stuff from scratch
30 replies
DDeno
Created by Kevin Tale on 11/22/2024 in #help
How to add a simple live reload?
On the client side, in a script tag of your index.html you should add:
const src = new EventSource('/live-reload')

src.addEventListener('message', (e) => {
if (e.data === 'reload') {
src.close()
location.reload()
}
})

src.addEventListener('open', () => {
console.log('Live reload connected!')
})
const src = new EventSource('/live-reload')

src.addEventListener('message', (e) => {
if (e.data === 'reload') {
src.close()
location.reload()
}
})

src.addEventListener('open', () => {
console.log('Live reload connected!')
})
30 replies
DDeno
Created by Kevin Tale on 11/22/2024 in #help
How to add a simple live reload?
30 replies
DDeno
Created by Kevin Tale on 11/22/2024 in #help
How to add a simple live reload?
Message too long 😦
30 replies
DDeno
Created by Kevin Tale on 11/22/2024 in #help
How to add a simple live reload?
This is the server part:
30 replies
DDeno
Created by Kevin Tale on 11/22/2024 in #help
How to add a simple live reload?
Here I am
30 replies
DDeno
Created by Kevin Tale on 11/22/2024 in #help
How to add a simple live reload?
and add some comments for explanation
30 replies