refactor: move spa to frontend folder
This commit is contained in:
46
frontend/admin/vite.config.js
Normal file
46
frontend/admin/vite.config.js
Normal 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',
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user