Код: Выделить всё
src/
│── assets/
│── pages/
│ ├── home/
│ │ ├── index.html
│ │ └── styles.css
│ └── contact/
│ ├── index.html
│ └── styles.css
src/
│── assets/
│── index.html
│── contact.html
< /code>
Вот моя конфигурация Vite: < /p>
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { defineConfig } from "vite";
const __dirname = dirname(fileURLToPath(import.meta.url));
export default defineConfig({
root: "src",
server: {
port: 3000,
},
build: {
rollupOptions: {
input: {
main: resolve(__dirname, "src/pages/home/index.html"),
contact: resolve(__dirname, "src/pages/contact/index.html"),
},
},
outDir: "../dist",
},
});
< /code>
Проблемы: < /p>
Я не могу указать файлы html в моей пользовательской структуре. < /li> < Br /> Я не могу установить пользовательскую структуру папок для моих файлов HTML. ?
Подробнее здесь: https://stackoverflow.com/questions/794 ... pp-in-vite