#Mark Path as External?
2 messages · Page 1 of 1 (latest)
In Astro, you can exclude certain files from the bundling process by using the excludeFiles property in your Astro configuration file. This can be useful when you want to exclude certain paths or files that are causing errors during the build process.
Here is an example of how you can do this:
import { defineConfig } from 'astro/config';
import vercel from '@astrojs/vercel/serverless';
export default defineConfig({
// ...
output: 'server',
adapter: vercel({
excludeFiles: ['./src/some_big_file.jpg'],
}),
});
In the excludeFiles array, you can list the paths to the files you want to exclude from the bundle. Replace './src/some_big_file.jpg' with the path you want to exclude.
Please note that this is a general solution and the exact implementation might vary depending on your project's structure and the specific issue you're facing.