refactor: move spa to frontend folder

This commit is contained in:
2025-10-27 12:32:38 +03:00
committed by Nikita Kiselev
parent 5681ac592a
commit 0cccc7e3d7
40 changed files with 1566 additions and 35 deletions

View File

@@ -0,0 +1,46 @@
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueDevTools from 'vite-plugin-vue-devtools'
// https://vite.dev/config/
export default defineConfig({
plugins: [
vue(),
vueDevTools(),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
},
},
build: {
manifest: true,
sourcemap: true,
outDir: '../modules/oc_telegram_shop/upload/admin/view/javascript',
emptyOutDir: true, // also necessary
rollupOptions: {
input: {
bulk_products: '/src/main.js',
},
output: {
entryFileNames: `[name].js`,
chunkFileNames: `[name].js`,
assetFileNames: `[name].[ext]`,
}
}
},
server: {
host: 'localhost', // или '0.0.0.0' для доступа извне
port: 3000, // Порт, на котором будет запущен Vite Dev Server
cors: true, // Разрешить CORS (для разработки)
hmr: {
host: 'localhost',
port: 3000,
protocol: 'ws',
},
},
})