Initial commit: New MoreminiMore website with fresh design
This commit is contained in:
36
node_modules/@astrojs/node/dist/vite-plugin-config.js
generated
vendored
Normal file
36
node_modules/@astrojs/node/dist/vite-plugin-config.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
const VIRTUAL_CONFIG_ID = "virtual:astro-node:config";
|
||||
const RESOLVED_VIRTUAL_CONFIG_ID = "\0" + VIRTUAL_CONFIG_ID;
|
||||
const SERVER_ENVIRONMENTS = ["ssr", "prerender", "astro"];
|
||||
function createConfigPlugin(config) {
|
||||
return {
|
||||
name: VIRTUAL_CONFIG_ID,
|
||||
configEnvironment(environmentName) {
|
||||
if (SERVER_ENVIRONMENTS.includes(environmentName)) {
|
||||
return {
|
||||
resolve: {
|
||||
noExternal: ["@astrojs/node"]
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
resolveId: {
|
||||
filter: {
|
||||
id: new RegExp(`^${VIRTUAL_CONFIG_ID}$`)
|
||||
},
|
||||
handler() {
|
||||
return RESOLVED_VIRTUAL_CONFIG_ID;
|
||||
}
|
||||
},
|
||||
load: {
|
||||
filter: {
|
||||
id: new RegExp(`^${RESOLVED_VIRTUAL_CONFIG_ID}$`)
|
||||
},
|
||||
handler() {
|
||||
return Object.entries(config).map(([k, v]) => `export const ${k} = ${JSON.stringify(v)};`).join("\n");
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
export {
|
||||
createConfigPlugin
|
||||
};
|
||||
Reference in New Issue
Block a user