Skip to content

Commit

Permalink
fix build config
Browse files Browse the repository at this point in the history
  • Loading branch information
konstantin.batakov committed Feb 14, 2024
1 parent f47096c commit 7661ccd
Showing 1 changed file with 31 additions and 21 deletions.
52 changes: 31 additions & 21 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,36 @@
import { defineConfig } from "vite";
import handlebars from "vite-plugin-handlebars";
import path from 'path'
import path from "path";

export default defineConfig({
plugins: [handlebars({
partialDirectory: path.resolve(__dirname, 'src/partials'),
})],
build: {
rollupOptions: {
input: {
index: path.resolve(__dirname, 'index.html'),
login: path.resolve(__dirname, 'src/pages/auth/login.html'),
register: path.resolve(__dirname, 'src/pages/auth/register.html'),
'404': path.resolve(__dirname, 'src/pages/errors/404.html'),
'500': path.resolve(__dirname, 'src/pages/errors/500.html'),
profile: path.resolve(__dirname, 'src/pages/profile/profile.html'),
chat: path.resolve(__dirname, 'src/pages/chat/chat.html')
},
},
},
server: {
host: '127.0.0.1',
open: true
}
plugins: [
handlebars({
partialDirectory: path.resolve(__dirname, "src/partials"),
}),
],
build: {
rollupOptions: {
input: {
index: path.resolve(__dirname, "index.html"),
login: path.resolve(__dirname, "src/pages/auth/login.html"),
register: path.resolve(__dirname, "src/pages/auth/register.html"),
404: path.resolve(__dirname, "src/pages/errors/404.html"),
500: path.resolve(__dirname, "src/pages/errors/500.html"),
profile: path.resolve(__dirname, "src/pages/profile/profile.html"),
"edit-profile": path.resolve(
__dirname,
"src/pages/edit-profile/edit-profile.html"
),
"edit-password": path.resolve(
__dirname,
"src/pages/edit-profile/edit-password.html"
),
chat: path.resolve(__dirname, "src/pages/chat/chat.html"),
},
},
},
server: {
host: "127.0.0.1",
open: true,
},
});

0 comments on commit 7661ccd

Please sign in to comment.