Hi there,
I'm using Fresh 2.1.1 and i have the assets and static folders. When working on dev mode (deno task dev) the website work as expected rendering both images on HTML <img> tag and on bg-[url(image/about/image-1.webp) CSS attribute, but after building the project using deno task build, the code expect that the file bg-[url(image/about/image-1.webp) is placed on assets folder, not on static.
I have ran the following steps:
deno run -Ar jsr:@fresh/init (set yes to tailwindcss and vscode).
- created
image folder into static folder and pasted both images.
- modified index.ts into this:
import { Head } from "fresh/runtime";
import { define } from "../utils.ts";
export default define.page(function Home(ctx) {
console.log("Shared value " + ctx.state.shared);
return (
<div class="px-4 py-8 mx-auto fresh-gradient min-h-screen">
<Head>
<title>Fresh counter</title>
</Head>
<div class="max-w-screen-md mx-auto flex flex-col items-center justify-center">
<img
class="my-6"
src="image/image-2.png"
/>
<div class="bg-[url('image/image-1.png')] bg-[length:200dvw] bg-right bg-no-repeat md:w-1/2 md:bg-[length:65dvw]">
<div class="px-4 py-20 md:py-72">
<h1 class="text-4xl">
TEST
</h1>
</div>
</div>
</div>
</div>
);
});
deno task build and noticed the following message on terminal: image/image-1.png referenced in image/image-1.png didn't resolve at build time, it will remain unchanged to be resolved at runtime.
deno task start and noticed the wrong refference on network tab.
Thank you for your attention.
Hi there,
I'm using Fresh 2.1.1 and i have the assets and static folders. When working on dev mode (
deno task dev) the website work as expected rendering both images on HTML<img>tag and onbg-[url(image/about/image-1.webp)CSS attribute, but after building the project usingdeno task build, the code expect that the filebg-[url(image/about/image-1.webp)is placed on assets folder, not on static.I have ran the following steps:
deno run -Ar jsr:@fresh/init(set yes to tailwindcss and vscode).imagefolder intostaticfolder and pasted both images.deno task buildand noticed the following message on terminal:image/image-1.png referenced in image/image-1.png didn't resolve at build time, it will remain unchanged to be resolved at runtime.deno task startand noticed the wrong refference on network tab.Thank you for your attention.