{"id":22902,"library":"vite-plugin-typo3","title":"Vite Plugin TYPO3","description":"Vite plugin for collecting and bundling entry points from TYPO3 extensions in a Composer-based TYPO3 setup. Version 3.0.0 adds support for Vite 8, drops CommonJS (ESM-only), and requires vite_asset_collector v1.16.0+. Provides automatic alias creation (EXT:/@), CORS defaults, and watcher ignore lists. Flexible configuration for project or extension mode. Actively maintained with monthly releases.","status":"active","version":"3.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/s2b/vite-plugin-typo3","tags":["javascript","vite-plugin","typescript"],"install":[{"cmd":"npm install vite-plugin-typo3","lang":"bash","label":"npm"},{"cmd":"yarn add vite-plugin-typo3","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-plugin-typo3","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; plugin integrates with Vite's build and dev server.","package":"vite","optional":false}],"imports":[{"note":"ESM-only since v3.0.0; CommonJS require() will throw.","wrong":"const typo3 = require('vite-plugin-typo3')","symbol":"default (typo3)","correct":"import typo3 from 'vite-plugin-typo3'"},{"note":"Named export; also ESM-only.","wrong":"const { getDefaultAllowedOrigins } = require('vite-plugin-typo3')","symbol":"getDefaultAllowedOrigins","correct":"import { getDefaultAllowedOrigins } from 'vite-plugin-typo3'"},{"note":"Named export, not default.","wrong":"import getDefaultIgnoreList from 'vite-plugin-typo3'","symbol":"getDefaultIgnoreList","correct":"import { getDefaultIgnoreList } from 'vite-plugin-typo3'"}],"quickstart":{"code":"import { defineConfig } from 'vite';\nimport typo3 from 'vite-plugin-typo3';\n\nexport default defineConfig({\n  plugins: [typo3()],\n});","lang":"typescript","description":"Minimal vite.config setup that integrates TYPO3 extension entry points. Requires EXT:my_extension/Configuration/ViteEntrypoints.json for actual entry collection."},"warnings":[{"fix":"Use ESM imports (import typo3 from 'vite-plugin-typo3').","message":"Dropped support for CommonJS. require() will fail.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Update vite_asset_collector TYPO3 extension to v1.16.0 and update Vite to ^7.0 || ^8.0.","message":"Requires vite_asset_collector v1.16.0+ and Vite 7 or 8.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Add custom origins via server.cors.origin using getDefaultAllowedOrigins() as a base.","message":"Strict CORS rules applied by default (v2+).","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Place the JSON file at EXT:my_extension/Configuration/ViteEntrypoints.json or set custom path via entrypointFile option.","message":"Entrypoint file default path is Configuration/ViteEntrypoints.json (not ViteEntrypoints.json).","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure TYPO3 extension has proper composer.json in its root.","message":"Aliases are only created for installed extensions with valid composer.json.","severity":"gotcha","affected_versions":">=1.1.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Update Vite to ^7.0 (or ^8.0) which is the peer dependency for v3.","cause":"Using an outdated Vite version (<7) or conflicting plugin interface.","error":"Error: The plugin 'vite-plugin-typo3' doesn't appear to be a valid Vite plugin."},{"fix":"Run 'npm install --save-dev vite-plugin-typo3' and ensure your project root contains node_modules.","cause":"Package not installed or missing from package.json.","error":"Cannot find module 'vite-plugin-typo3'"},{"fix":"Use ESM in your config file (e.g., .mjs or type: module) and ensure v3.0.0+.","cause":"Using named import from a CJS context or incorrect version.","error":"The requested module 'vite-plugin-typo3' does not provide an export named 'getDefaultAllowedOrigins'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}