mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
refactor(es modules): move all files to src, try vite 3.0
This commit is contained in:
parent
4feed39d5c
commit
0d05e1b250
119 changed files with 8218 additions and 139 deletions
|
|
@ -1,25 +1,25 @@
|
|||
import {defineConfig} from "vite";
|
||||
import {fileURLToPath} from "url";
|
||||
import path from "path";
|
||||
// import {defineConfig} from "vite";
|
||||
// import {fileURLToPath} from "url";
|
||||
// import path from "path";
|
||||
|
||||
const pathName = path.dirname(fileURLToPath(import.meta.url));
|
||||
const resolved = path.resolve(pathName, "./src");
|
||||
// const pathName = path.dirname(fileURLToPath(import.meta.url));
|
||||
// const resolved = path.resolve(pathName, "./src");
|
||||
|
||||
export default defineConfig({
|
||||
// base: "/Fantasy-Map-Generator/",
|
||||
resolve: {
|
||||
alias: [
|
||||
// "@": "./src"
|
||||
// "@": path.resolve(path.dirname(fileURLToPath(import.meta.url)), "./src")
|
||||
// "@": path.resolve(path.dirname(fileURLToPath(import.meta.url)), "/src")
|
||||
{
|
||||
find: "@",
|
||||
replacement: path.resolve(pathName, "./src"),
|
||||
customResolver: request => {
|
||||
console.log(request);
|
||||
return request;
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
// export default defineConfig({
|
||||
// // base: "/Fantasy-Map-Generator/",
|
||||
// resolve: {
|
||||
// alias: {
|
||||
// // "@": path.resolve(pathName, "./src")
|
||||
// // "@": path.resolve(path.dirname(fileURLToPath(import.meta.url)), "./src")
|
||||
// // "@": path.resolve(path.dirname(fileURLToPath(import.meta.url)), "/src")
|
||||
// // {
|
||||
// // find: "@",
|
||||
// // replacement: path.resolve(pathName, "./src"),
|
||||
// // customResolver: request => {
|
||||
// // console.log(request);
|
||||
// // return request;
|
||||
// // }
|
||||
// // }
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue