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

Which configuration dirs must be set with root? #28

Open
Farnsi opened this issue Nov 30, 2024 · 2 comments
Open

Which configuration dirs must be set with root? #28

Farnsi opened this issue Nov 30, 2024 · 2 comments

Comments

@Farnsi
Copy link

Farnsi commented Nov 30, 2024

vite Example:

export default defineConfig({
  root: './src',
  plugins: [
    pluginAPIRoutes({
      cacheDir: '../.api', // this starts without an error
    }),
  ],
  //...
}

Call a route errors Error: Cannot find module 'express' imported from '/home/myproject/.api/configure.js'
Express is installed.

@Farnsi
Copy link
Author

Farnsi commented Dec 6, 2024

With absolute path it works. cacheDir: process.cwd() + '/.api',

@Farnsi Farnsi closed this as completed Dec 6, 2024
@Farnsi
Copy link
Author

Farnsi commented Dec 6, 2024

Na not working. When you use absolute path it will not create .api with configure.ts,....

And the next question, which paths must be set, if you want to use api-Files outside of src?

@Farnsi Farnsi reopened this Dec 6, 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

No branches or pull requests

1 participant