
Security Fundamentals
Turtles, Clams, and Cyber Threat Actors: Shell Usage
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
vite-plugin-symfony
Advanced tools
A Vite plugin to integrate easily Vite in your Symfony application..
A Vite plugin to integrate easily Vite in your Symfony application..
entrypoints.json
inside your build directory with your js/css/preload dependencies.This package is intended for use with the Symfony Bundle : pentatrion/vite-bundle.
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
// vite.config.js
import {defineConfig} from "vite";
import symfonyPlugin from "vite-plugin-symfony";
/* if you're using React */
// import reactRefresh from "@vitejs/plugin-react-refresh";
export default defineConfig({
plugins: [
/* reactRefresh(), // if you're using React */
symfonyPlugin(),
],
root: "./assets/",
/* your outDir web path prefix */
base: "/build/",
build: {
manifest: true,
emptyOutDir: true,
assetsDir: "",
outDir: "../public/build/",
rollupOptions: {
input: {
app: "./app.ts" /* relative to the root option */
},
},
}
});
and your package.json :
{
"scripts": {
"dev": "vite",
"build": "vite build"
},
"devDependencies": {
"vite": "~2.7",
"vite-plugin-symfony": "^0.2.0"
}
}
There is a small difference in the configuration of the input paths between these 2 versions.
// vite.config.js
export default defineConfig({
root: "./assets/",
build: {
rollupOptions: {
input: {
- /* vite-plugin-symfony v0.1.x */
- app: "./assets/app.ts" /* relative to the Symfony project root */
+ /* vite-plugin-symfony v0.2.x */
+ app: "./app.ts" /* relative to the vite.config.js root option */
},
},
}
});
this issue comes from the fact that :
Although it has no special dependencies, this package is intended for use with the Symfony Bundle : pentatrion/vite-bundle. This bundle provides two twig functions to load your js/css files into your templates. It also acts as a proxy by forwarding requests that are not intended for it to the Vite dev server.
FAQs
A Vite plugin to integrate easily Vite in your Symfony application
The npm package vite-plugin-symfony receives a total of 18,017 weekly downloads. As such, vite-plugin-symfony popularity was classified as popular.
We found that vite-plugin-symfony demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security Fundamentals
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Security News
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
Product
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.