Hi, I am using astrojs and I wanted to see if it was possible to change the compilation directory for each file, for example I have in my src/pages/blog/index.astro and when I compile it generates blog.html in the root of dist but not inside the blog/... as in my development structure, I was trying with vitejs to achieve this and I get an error :
[vite:load-fallback] Could not load @astro-page:src/pages/internship@_@astro: The argument 'path' must be a string or Uint8Array without null bytes. Received '\x00@astro-page:src/pages/internship@_@astro'
error Could not load @astro-page:src/pages/internship@_@astro: The argument 'path' must be a string or Uint8Array without null bytes. Received '\x00@astro-page:src/pages/internship@_@astro'
this is my astro.config
import {defineConfig} from 'astro/config';
import sitemap from "@astrojs/sitemap";
import {fileURLToPath} from 'url';
import mdx from "@astrojs/mdx";
import * as path from "path";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
// https://astro.build/config
export default defineConfig({
//trailingSlash: 'never',
integrations: [sitemap(), mdx({
syntaxHighlight: 'shiki',
shikiConfig: {theme: 'dracula'},
})],
build: {
format: 'file',
assets: 'assets'
},
vite: {
root: path.resolve(__dirname, './src'),
build: {
rollupOptions: {
input: {
//Html entries
home: path.resolve(__dirname, "./src/pages/index.astro")
}
}
}
}
});
Someone with experience in astro and vitejs can give me a hand? I would appreciate it 🙂