Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lhapaipai/vite-plugin-symfony
Vite plugin to use your bundler with Symfony
https://github.com/lhapaipai/vite-plugin-symfony
symfony vite-plugin
Last synced: 2 days ago
JSON representation
Vite plugin to use your bundler with Symfony
- Host: GitHub
- URL: https://github.com/lhapaipai/vite-plugin-symfony
- Owner: lhapaipai
- License: other
- Created: 2021-11-22T20:34:18.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-27T18:33:02.000Z (3 months ago)
- Last Synced: 2025-02-01T19:09:13.601Z (9 days ago)
- Topics: symfony, vite-plugin
- Language: TypeScript
- Homepage: https://symfony-vite.pentatrion.com
- Size: 475 KB
- Stars: 47
- Watchers: 3
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
![]()
![]()
# Vite plugin Symfony
> [!IMPORTANT]
> This repository is a "subtree split": a read-only subset of that main repository [symfony-vite-dev](https://github.com/lhapaipai/symfony-vite-dev) which delivers to packagist only the necessary code.> [!IMPORTANT]
> If you want to open issues, contribute, make PRs or consult examples you will have to go to the [symfony-vite-dev](https://github.com/lhapaipai/symfony-vite-dev) repository.A Vite plugin to easily integrate Vite into your Symfony application.
- create a `entrypoints.json` file inside your build directory with your js/css/preload dependencies.
- reload your browser when you update your twig filesThis package is intended for use with the Symfony Bundle : [pentatrion/vite-bundle](https://github.com/lhapaipai/vite-bundle).
## Installation
```console
npm i vite-plugin-symfony
```Create this directory structure :
```
├──assets
│ ├──app.js
│ ├──app.css
│...
├──public
├──composer.json
├──package.json
├──vite.config.js
```Vite base config with vite
```js
// vite.config.js
import {defineConfig} from "vite";
import symfonyPlugin from "vite-plugin-symfony";export default defineConfig({
plugins: [
symfonyPlugin(/* options */),
],build: {
rollupOptions: {
input: {
app: "./assets/app.js" /* relative to the root option */
},
},
}
});
```and your package.json :
```json
{
"scripts": {
"dev": "vite",
"build": "vite build"
},
"devDependencies": {
"vite": "^5.0",
"vite-plugin-symfony": "^7.1"
}
}
```[Read the Docs to Learn More](https://symfony-vite.pentatrion.com).
## Ecosystem
| Package | Description |
| ----------------------------------------------------------------------- | :------------------------ |
| [vite-bundle](https://github.com/lhapaipai/vite-bundle) | Symfony Bundle (read-only)|
| [symfony-vite-dev](https://github.com/lhapaipai/symfony-vite-dev) | Package for contributors |## License
[MIT](LICENSE).