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

[Proposal] Bundle config file to some outdir #314

Open
GoodbyeNJN opened this issue Jun 19, 2024 · 0 comments
Open

[Proposal] Bundle config file to some outdir #314

GoodbyeNJN opened this issue Jun 19, 2024 · 0 comments

Comments

@GoodbyeNJN
Copy link
Contributor

let out = `${configFileName}.timestamp_${Date.now()}.${
["ts", "js", "tsx", "jsx"].includes(ext) ? "js" : "mjs"
}`;
await bundleConfigFile(options.configFile, out);
const importedApp = await import(pathToFileURL(out).href).then((m) => ({
export: m.default,
path: filepath,
}));
await rm(out);

The current output directory is the project root directory. After starting dev server, a temporary config file will be generated in the project root directory. It needs to be manually ignored from git, and in some cases, the file will not be automatically deleted after stopping dev server. This is quite annoying.

Instead, I recommend changing the output directory to other directories, such as .temp, node_modules/temp, node_modules/.vinxi/temp, etc. These directories are generally ignored by git and do not matter even if they are not automatically deleted.

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