Comments (2)
The prefix
logic is deeply tied to encapsulation and implemented using the same logic. There is no way to support both unfortunately.
Why do you have to set encapsulate: false
in your example? You do not seem to be using decorators or hooks.
from fastify-autoload.
I was having a double slash issue, and it got resolved when I used encapsulate false. But, now I just added one more slash
like,
export default async function AuthModule (app) {
app.register(AuthRoutes, { prefix: '/auth' }) // -> here
}
Everything is working fine now, closing it, thanks!
from fastify-autoload.
Related Issues (20)
- Fastify autoload throwing errors about ts in projects that don't use ts HOT 4
- babel-node + typescript. Error only with autoloads : throw new Error(@fastify/autoload cannot import plugin at '${file}'. To fix this error compile TypeScript to JavaScript or use 'ts-node' to run your app.) HOT 5
- Add matchPattern to load only some specific paths HOT 2
- dirNameRoutePrefix option doesn't work when set to false HOT 2
- Mock plugins with autoload HOT 2
- Property '<property>' does not exist on type FastifyInstance when loading TS plugin HOT 1
- Two fastify instances, two `indexPattern` that seems been ignored HOT 2
- Autoload cannot read absolute paths from tsconfig throws error - "Error","message":"Cannot find module '@/Model/User/UserVerifyService' HOT 2
- Node 20 auto-loader not able to transpile TS to JS when using ts-node/esm HOT 24
- Params validation HOT 7
- Not able to have top-level await in a ts ESM file? HOT 3
- Fastify Autoload does not work with Bun.js or deno HOT 2
- setNotFoundHandler is not encapsulated when called inside autohooks.js HOT 3
- autoloader breaks node --test --experimental-test-coverage HOT 2
- Cannot use with esm only HOT 1
- ts-node error with plugins using custom instance field via declaration merging HOT 1
- fileNameRoutePrefix HOT 3
- autoConfig dependencies not respected HOT 1
- Typescript, Vitetest, and Autoload HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastify-autoload.