Some checks failed
Telegram Mini App Shop Builder / Compute version metadata (push) Has been cancelled
Telegram Mini App Shop Builder / Run Frontend tests (push) Has been cancelled
Telegram Mini App Shop Builder / Run Backend tests (push) Has been cancelled
Telegram Mini App Shop Builder / Run PHP_CodeSniffer (push) Has been cancelled
Telegram Mini App Shop Builder / Build module. (push) Has been cancelled
Telegram Mini App Shop Builder / release (push) Has been cancelled
49 lines
1.2 KiB
JavaScript
49 lines
1.2 KiB
JavaScript
import {fileURLToPath, URL} from 'node:url';
|
|
|
|
import {defineConfig} from 'vite';
|
|
import vue from '@vitejs/plugin-vue';
|
|
import vueDevTools from 'vite-plugin-vue-devtools';
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
vueDevTools(),
|
|
tailwindcss(),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
|
},
|
|
},
|
|
|
|
build: {
|
|
manifest: false,
|
|
sourcemap: false,
|
|
outDir: '../../module/acmeshop/upload/admin/view/javascript/acmeshop',
|
|
emptyOutDir: true, // also necessary
|
|
rollupOptions: {
|
|
input: {
|
|
acmeshop: '/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',
|
|
},
|
|
},
|
|
});
|