Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Todo] Nested directories in www do not seem to copy deeply #16

Open
zaydek opened this issue Apr 11, 2021 · 0 comments
Open

[Todo] Nested directories in www do not seem to copy deeply #16

zaydek opened this issue Apr 11, 2021 · 0 comments

Comments

@zaydek
Copy link
Owner

zaydek commented Apr 11, 2021

www/images/my-image.jpg copies as www/my-image. Furthermore images are not externalized by default which trips up esbuild.

const images = {
  name: 'images',
  setup(build) {
    build.onResolve({ filter: /\.(jpe?g|png)$/ }, args => {
      return {
        path: args.path,
        external: true,
      }
    })
  },
}

module.exports = {
  target: ["es2017"],
  plugins: [images],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant