Skip to content

Commit

Permalink
a fix for the html files paths again. this time using relative paths …
Browse files Browse the repository at this point in the history
…and adding support for nested directories.
  • Loading branch information
Mehran7kl committed Aug 31, 2024
1 parent 2c50e3f commit 44a75bd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { defineConfig } from "vite";
import { glob } from "glob";
export default defineConfig(()=>{
let pattern=__dirname+"/*.html";
pattern=pattern.replace("//","/").replace("\\/","/");
const g = glob.sync(pattern);
let pattern="./**/*.html";

const g = glob.sync(pattern,{ignore:"./dist/**"}).map(str=>str.replace("\\","/"));


return {
base:"/Mini-Projects/",
define: {htmlFiles:g.map(file=> file.split("/").at(-1))},
Expand Down

0 comments on commit 44a75bd

Please sign in to comment.