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

nuxt-module-build does not handle folders starting with . inside src/runtime during optimizations and building #400

Open
vitebo opened this issue Oct 8, 2024 · 2 comments · May be fixed by unjs/mkdist#253
Assignees

Comments

@vitebo
Copy link

vitebo commented Oct 8, 2024

Environment

  • Operating System: Darwin
  • Node Version: v20.14.0
  • Nuxt Version: 3.13.2
  • CLI Version: 3.14.0
  • Nitro Version: 2.9.7
  • Package Manager: [email protected]
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://github.com/vitebo/nuxt-ignore-dot-folder-issue

# Install dependencies
npm install
  
# Build module
npm run prepack

Check the dist folder for the generated files.

Note that the file dist/runtime/public/.well-known/assetlinks.json does not exist.

Describe the bug

The nuxt-module-build process ignores folders that start with a . (dot) inside the src/runtime directory when performing optimizations and moving them to the dist folder.

Additional context

Context and Importance of the Fix:

I am working on a Nuxt module that sets up the PWA for my application, which is available on the Google Play Store. For this to work, Google requires a specific file to be accessible at https://domain.name/.well-known/assetlinks.json, containing a key they provide.

You can find more information here: Verify Android App Links.

Logs

No response

Copy link

github-actions bot commented Oct 8, 2024

Stackblitz link for the reproduction: Stackblitz

@TomKriek
Copy link

Had a similar issue trying to register some server route. via addServerScanDir
We fixed ours by adding it manually via addServerHandler and defining it properly.

addServerHandler({
      handler: resolve('./runtime/server/custom/health-check.get'),
      route: '/.well-known/health',
});

Maybe you can try something similar in the meantime.

@danielroe danielroe transferred this issue from nuxt/nuxt Oct 17, 2024
@danielroe danielroe linked a pull request Oct 17, 2024 that will close this issue
@danielroe danielroe self-assigned this Oct 17, 2024
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

Successfully merging a pull request may close this issue.

3 participants