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

Files with an initial . are copied incorrectly #2861

Closed
arnog opened this issue Jan 22, 2023 · 1 comment
Closed

Files with an initial . are copied incorrectly #2861

arnog opened this issue Jan 22, 2023 · 1 comment

Comments

@arnog
Copy link

arnog commented Jan 22, 2023

Files that start with a ., e.g. .htaccess, seems to confuse the copy loader.

Using a relative path:

build({
  entryPoints: ['./packages/website/assets/.htaccess'],
  outdir: './build/',
  loader: { '.htaccess': 'copy' },
}).catch(() => process.exit(1));

result in a file assets.htaccess copied into the ./build directory.

Using an absolute path:

build({
  entryPoints: ['/Users/arno/dev/packages/website/assets/.htaccess'],
  outdir: './build/',
  loader: { '.htaccess': 'copy' },
}).catch(() => process.exit(1));

result in a file ..htaccess copied into the ./build directory (note the double .).

I was expecting the file .htaccess to be copied into the ./build directory.

@evanw
Copy link
Owner

evanw commented Jan 22, 2023

Thanks for the report. I'll work on a fix.

@evanw evanw closed this as completed in 6c25c9e Jan 22, 2023
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

2 participants