clone repos
updat nuxt.config
This commit is contained in:
parent
61c0fc5a8f
commit
006692ac2b
|
@ -1,6 +1,6 @@
|
|||
// import { fileURLToPath } from "url";
|
||||
import fs from 'fs-extra';
|
||||
import path from 'path';
|
||||
import fs from "fs-extra";
|
||||
import path from "path";
|
||||
|
||||
let sassEnvVariables = "";
|
||||
for (let e in import.meta.env) {
|
||||
|
@ -18,9 +18,13 @@ if (buildName == "hadith")
|
|||
|
||||
export default defineNuxtConfig({
|
||||
hooks: {
|
||||
'build:before': () => {
|
||||
const sourceDir = path.resolve(__dirname, `systems/${buildName}_ui/assets/${buildName}/images`); // Source folder (e.g., assets/images)
|
||||
const targetDir = path.resolve(__dirname, 'public/img'); // Target folder (e.g., public/images)
|
||||
"build:before": () => {
|
||||
if (buildName == "hadith") {
|
||||
const sourceDir = path.resolve(
|
||||
__dirname,
|
||||
`systems/${buildName}_ui/assets/${buildName}/images`
|
||||
); // Source folder (e.g., assets/images)
|
||||
const targetDir = path.resolve(__dirname, "public/img"); // Target folder (e.g., public/images)
|
||||
|
||||
// Ensure the target directory exists
|
||||
fs.ensureDirSync(targetDir);
|
||||
|
@ -28,7 +32,8 @@ export default defineNuxtConfig({
|
|||
// Copy files from source to target
|
||||
fs.copySync(sourceDir, targetDir);
|
||||
|
||||
console.log('Files copied successfully!');
|
||||
console.log("Files copied successfully!");
|
||||
}
|
||||
},
|
||||
|
||||
"pages:extend"(pages) {
|
||||
|
@ -137,7 +142,6 @@ export default defineNuxtConfig({
|
|||
// mode: 'init'
|
||||
// },
|
||||
image: {
|
||||
|
||||
inject: true,
|
||||
quality: 80,
|
||||
format: ["webp", "jpeg", "jpg", "png", "gif", "avif"],
|
||||
|
|
2589
package-lock.json
generated
2589
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -37,6 +37,7 @@
|
|||
"jquery": "^3.7.1",
|
||||
"mammoth": "^1.8.0",
|
||||
"mitt": "^3.0.1",
|
||||
"npm": "^11.1.0",
|
||||
"nuxt": "^3.15.4",
|
||||
"nuxt-echarts": "^0.2.3",
|
||||
"pinia-plugin-persistedstate": "^4.1.1",
|
||||
|
|
Loading…
Reference in New Issue
Block a user