lumeland / lume

🔥 Static site generator for Deno 🦕
https://lume.land
MIT License
1.75k stars 74 forks source link

Did `basename` just break `esbuild` plugin? #617

Closed ngdangtu-vn closed 3 weeks ago

ngdangtu-vn commented 3 weeks ago

Version

2.2.1

Platform

linux / ubuntu / tuxedo os 3

What steps will reproduce the bug?

  1. create a folder, let's call frontend/
  2. add frontend/_data.ts with content like this
    export default { basename: '/' }
  3. create main.ts with simple content such as console.log('hello-world')
  4. install esbuild plugin
  5. run deno task serve

How often does it reproduce? Is there a required condition?

always in both build mode and server mode

What is the expected behavior?

The esbuild should build the files then copy the built files to a new path

What do you see instead?

The files (that were meant to be built) got copied to a new path before esbuild can start working on it. In the end, the origin files were copied to the public and the built files are still created in the old relative path under public root.

Additional information

This is a bug because the sass plugin doesn't have this behaviour.

oscarotero commented 3 weeks ago

Thanks for reporting this. I can reproduce this issue and indeed it's a bug.