{"id":25388968,"url":"https://github.com/webforge-labs/symfony-vite-bundle","last_synced_at":"2026-03-05T05:32:00.245Z","repository":{"id":277328799,"uuid":"932073079","full_name":"webforge-labs/symfony-vite-bundle","owner":"webforge-labs","description":"Integrate symfony with vite","archived":false,"fork":false,"pushed_at":"2025-11-01T09:18:29.000Z","size":56,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-04T05:47:15.233Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webforge-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-13T10:17:02.000Z","updated_at":"2025-11-01T09:18:31.000Z","dependencies_parsed_at":"2025-02-13T11:42:59.705Z","dependency_job_id":null,"html_url":"https://github.com/webforge-labs/symfony-vite-bundle","commit_stats":null,"previous_names":["pscheit/symfony-vite-bundle"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/webforge-labs/symfony-vite-bundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webforge-labs%2Fsymfony-vite-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webforge-labs%2Fsymfony-vite-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webforge-labs%2Fsymfony-vite-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webforge-labs%2Fsymfony-vite-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webforge-labs","download_url":"https://codeload.github.com/webforge-labs/symfony-vite-bundle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webforge-labs%2Fsymfony-vite-bundle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30111743,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T03:40:26.266Z","status":"ssl_error","status_checked_at":"2026-03-05T03:39:15.902Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-15T13:52:22.064Z","updated_at":"2026-03-05T05:32:00.192Z","avatar_url":"https://github.com/webforge-labs.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# symfony-vite-bundle\n\nIntegrate symfony with vite\n\n## installation\n\nadd\n```\n\\Vite\\WebforgeViteBundle::class =\u003e ['all' =\u003e true],\n```\nto your bundles.php\n\n### environment variables\n\n```\nINTERNAL_WEB_ADDR='http://nginx'\nVITE_DEV_SERVER=http://myapp.local.dev:3030\nAPP_CDN=\n```\n\n`VITE_DEV_SERVER` point this to the full url where your vite dev server runs (if you run `vite`). Your browser needs to have access to this url.\n`INTERNAL_WEB_ADDR` point this to your internal web server. Your PHP (container) needs to get access via this url to the files written by vite into the public folder.\n\n`APP_CDN` special setup for production, if you use a cdn.\n\n## usage\n\nExtend your base.html.twig with a template like this:\n\n```twig\n{% extends 'base.html.twig' %}\n\n{% block title %}YAY Checkout{% endblock %}\n\n{% block body %}\n    \u003cdiv id=\"app\" class=\"hide-on-load\"\u003e\n        \u003cshopping-frame/\u003e\n    \u003c/div\u003e\n{% endblock %}\n\n{% block stylesheets %}\n    {{ vite_entry_link_tags('app') }}\n{% endblock %}\n\n{% block javascripts %}\n    {{ vite_entry_script_tags('app') }}\n{% endblock %}\n```\n\nGiven that you have a `app.js` in `assets`, you can reference it in your vite config like this (see rollup options: input): \n\n```js\nimport { defineConfig } from 'vite'\nimport vue from '@vitejs/plugin-vue'\nimport vueform from '@vueform/vueform/vite'\nimport tailwindcss from '@tailwindcss/vite'\n\n// https://vite.dev/config/\nexport default defineConfig({\n  plugins: [\n      vue(),\n      vueform(),\n      tailwindcss(),\n  ],\n  server: {\n    host: '0.0.0.0',\n    port: 3000,\n    origin: process.env.VITE_DEV_SERVER,\n    cors: {\n      \"origin\": \"*\"\n    },\n    allowedHosts: [\n        'myapp.local.dev'\n    ],\n    watch: {\n      // needed if you want to reload dev server with twig\n      disableGlobbing: false,\n    },\n    hmr: {\n      clientPort: 3030\n    }\n  },\n  root: \".\",\n  base: '/build/',\n  publicDir: false,\n  build: {\n    manifest: true,\n    emptyOutDir: true,\n    assetsDir: \"\",\n    outDir: \"public/build/\",\n    rollupOptions: {\n      input: {\n        app: \"./assets/app.js\"\n      },\n    },\n  },\n  resolve: {\n    alias: {\n      vue: 'vue/dist/vue.esm-bundler.js'\n    }\n  }\n})\n\n```\n\nAdjust \"allowedHosts\", manually with the same domain you reference in `VITE_DEV_SERVER`.\n\n## Contribute\n\nInstall casey/just\n\n```bash\njust up\n```\n\n```bash\nprep\n```\n(runs phpunit, phpstan, everything you need to make a commit).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebforge-labs%2Fsymfony-vite-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebforge-labs%2Fsymfony-vite-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebforge-labs%2Fsymfony-vite-bundle/lists"}